< Home

more

Function

The more command displays the content of a specified file.

Format

more filename [ offset ] [ all ]

Parameters

Parameter Description Value
filename Specifies the file name.

The value is a string of 1 to 160 case-insensitive characters without spaces in the format [ drive ] [ path ] filename. If the string is enclosed in double quotation marks (" "), the string can contain spaces. If the value is a file name, the value is a string of 1 to 64 characters.

In the preceding parameter, drive specifies the storage device name, and path specifies the directory and subdirectory.

You are advised to add : and / between the storage device name and directory. The directory name cannot contain the following characters: ~ * / \ : ' "

offset Specifies the file offset. The value is an integer that ranges from 0 to 2147483647, in bytes.
all Displays all the file content on one screen. -

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

You can run the more command to display the file content directly on a device.

  • The following describes the drive name.

    • drive is the storage device and is named as flash:.

    • If devices are stacked, drive can be named as:

      • flash: root directory of the flash memory of the master switch in the stack.
      • chassis ID#flash: root directory of the flash memory on a device in the stack.

      For example, slot2#flash: indicates the flash memory in slot 2.

  • The path can be an absolute path or relative path. A relative path can be designated relative to either the root directory or the current working directory. A relative path beginning with a slash (/) is a path relative to the root directory.
    • flash:/my/test/ is an absolute path.

    • /selftest/ is a path relative to the root directory and indicates the selftest directory in the root directory.

    • selftest/ is a path relative to the current working directory and indicates the selftest directory in the current working directory.

Precautions

  • You are not advised to use this command to display non-text files; otherwise, the terminal is shut down or displays garbled characters, which is harmless to the system.

  • Files are displayed in text format.

  • You can display the file content flexibly by specifying parameters before running the more command:
    • You can run the more filename command to view a specified text file. The content of the specified text file is displayed on multiple screens. You can press the spacebar consecutively on the current session GUI to display all content of the file.

      To display the file content on multiple screens, you must ensure that:
      • The number of lines that can be displayed on a terminal screen is greater than 0. (The number of lines that can be displayed on a terminal screen is set by running the screen-length command.)
      • The total number of file lines is greater than the number of lines that can be displayed on a terminal screen. (The number of lines that can be displayed on a terminal screen is set by running the screen-length command.)
    • You can run the more filename offset command to view a specified file. The content of the specified text file starting from offset is displayed on multiple screens. You can press the spacebar consecutively on the current session GUI to display all content of the file.

      To display the file content on multiple screens, you must ensure that:
      • The number of lines that can be displayed on a terminal screen is greater than 0. (The number of lines that can be displayed on a terminal screen is set by running the screen-length command.)
      • The number of lines starting from offset in the file is greater than the number of lines that can be displayed on a terminal screen. (The number of lines that can be displayed on a terminal screen is set by running the screen-length command.)
    • You can run the more file-name all command to view a specified file. The file content is displayed on one screen.

Example

# Display the content of the file test.bat.

<HUAWEI> more test.bat
rsa local-key-pair create
user-interface vty 12 14
authentication-mode aaa
protocol inbound ssh
user privilege level 5
quit
ssh user sftpuser authentication-type password
ssh user sftpuser service-type all
sftp server enable
# Display the content of the file log.txt and set the offset to 100.
<HUAWEI> more log.txt 100
:                CHINA HUAWEI TECHNOLOGY LIMITTED CO.,LTD
#   FILE NAME:                  Product Adapter File(PAF)
#   PURPOSE:                    MAKE VRPV5 SUITABLE FOR DIFFERENT PRODUCT IN LIB
#   SOFTWARE PLATFORM:          V6R2C00
#   DETAIL VERSION:             B283
#   DEVELOPING GROUP:            8090 SYSTEM MAINTAIN GROUP
#   HARDWARE PLATFORM:          8090 (512M Memory)
#   CREATED DATE:               2003/05/10
#   AUTH:                        RAINBOW
#   Updation History:           Kelvin dengqiulin update for 8090(2004.08.18)
#                               lmg update for R3(2006.11.7)
#                               fsr update for R5 (2008.1.18)
#                               qj update for R6 (2008.08.08)
#   COPYRIGHT:                           2003---2008
#----------------------------------------------------------------------------------


#BEGIN FOR RESOURCE DEFINATION
[RESOURCE]
FORMAT: SPECS RESOURCE NAME STRING = CONTROLLABLE(1 : ABLE , 0: NOT ABLE),DEFAUL
T VALUE , MAX VALUE , MIN VALUE
#BEGIN  SPECS RESOURCE FOR TE tunnel Nto1 PS MODULE
PAF_LCS_TUNNEL_SPECS_TE_PS_MAX_PROTECT_NUM = 1, 8, 16, 1
PAF_LCS_TUNNEL_SPECS_TE_PS_REBOOT_TIME     = 1, 180000, 3600000, 60000
  ---- More ----                                                               
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >