< Home

display history-command

Function

The display history-command command displays the history command saved on the terminal devices.

Format

display history-command

Parameters

Nine

Views

All views

Default Level

0: Visit level

Usage Guidelines

The terminal automatically saves the history commands entered by the user, that is, records any keyboard entry of the user with Enter as the unit. In this case, the users can view the saved history commands by the display history-command command.

By default, 10 latest commands are displayed.

  • The saved history commands are the same as that are input by users. For example, if the user inputs an incomplete command, the saved command also is incomplete.

  • If the user executes the same command for several times, the command earliest executed is saved. If the same command is output in different forms, they are considered as different commands.

You can use the history commands.

  • Access the last history command: Up cursor key↑ or Ctrl_P.

    Display the last history command if there is an earlier history command. Otherwise, an alarm is generated.

  • Access the next history command: Down cursor key ↓ or Ctrl_N.

    Display the next history command if there is a later history command. Otherwise, the command is cleared and an alarm is generated.

On the HyperTerminal of Windows 9X, cursor key ↑ is invalid as the HyperTerminals of Windows 9X define the keys differently. In this case, you can replace the cursor key ↑ with Ctrl_P.

Example

# Display the history commands used on the terminal.

<sysname> display history-command
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >