The display history-command all-users command displays historical commands saved in the system.
Usage Scenario
The terminal automatically saves commands entered by users. All the inputs ended with Enter are saved as historical commands.
To view the historical commands entered by all users, run the display history-command all-users command.
To access the last historical command, use the Up cursor key↑ or Ctrl_P.
If there is an earlier historical command, the last historical command is displayed. Otherwise, a bell is generated.
To access the next historical command, use the Down cursor key ↓ or Ctrl_N.
If there is a later historical command, the next historical command is displayed. Otherwise, the command is cleared, and a bell is generated.
Precautions
The formats of the saved historical commands are the same as those of the commands entered by users. If the formats of the commands used by the users are incomplete, the formats of the saved historical commands are also incomplete.
If a user runs the same command several times, only the earliest command is saved as a historical command of FW. However, if the same command is entered in different formats, they are saved as different commands.
# Display the historical commands that have been entered on the terminal.
<sysname> display history-command all-users User : admin, VT0, 192.168.0.82 Time : 2016-10-13 14:49:19+00:00 Command: v User : admin, VT0, 192.168.0.82 Time : 2016-10-13 14:49:19+00:00 Command: diag User : admin, VT1, 192.168.0.82 Time : 2016-10-13 14:48:27+00:00 Command: action deny User : admin, VT1, 192.168.0.82 Time : 2016-10-13 14:48:27+00:00 Command: security-policy
Item |
Description |
|---|---|
User |
User information, including the user name, VTY channel, and IP address |
Time |
Time at which the command is executed |
Command |
Executed command |