Cisco Systems Cisco IOS XR Manual De Usuario
6-16
Cisco IOS XR Getting Started Guide
OL-10957-02
Chapter 6 CLI Tips, Techniques, and Shortcuts
Command History
Multiple commands can be supported under a single command alias, and multiple variables can be
supported for each command. If multiple commands are specified under a single alias, then each
command is executed in the order in which it is listed in the alias command.
supported for each command. If multiple commands are specified under a single alias, then each
command is executed in the order in which it is listed in the alias command.
In the following example, an alias named my-cookie is created for the Management Ethernet interface,
and then the new alias is specified to enter interface configuration mode:
and then the new alias is specified to enter interface configuration mode:
RP/0/0/CPU0:router(config)# alias my-cookie mgmtEth 0/0/CPU0/0
RP/0/0/CPU0:router(config)# interface my-cookie
RP/0/0/CPU0:router(config)# interface mgmtEth 0/0/CPU0/0
RP/0/0/CPU0:router(config-if)#
After you enter a command with an alias, the router displays the command you entered with the alias
value so that you can verify that alias value.
value so that you can verify that alias value.
To delete a specific alias, enter the no form of the alias command with the alias name.
Keystrokes Used as Command Aliases
The system can be configured to recognize particular keystrokes (key combination or sequence) as
command aliases. In other words, a keystroke can be set as a shortcut for executing a command. To
enable the system to interpret a keystroke as a command, use the Ctrl-V or Esc, Q key combinations
before entering the command sequence.
command aliases. In other words, a keystroke can be set as a shortcut for executing a command. To
enable the system to interpret a keystroke as a command, use the Ctrl-V or Esc, Q key combinations
before entering the command sequence.
Command History
The Cisco IOS XR software lets you display a history of the most recently entered and deleted
commands. You can also redisplay the command line while a console message is being shown. The
following sections describe the command history functionality:
commands. You can also redisplay the command line while a console message is being shown. The
following sections describe the command history functionality:
•
•
•
•
Note
To roll back to a previously committed configuration, see the
Displaying Previously Entered Commands
The Cisco IOS XR software records the ten most recent commands issued from the command line in its
history buffer. This feature is particularly useful for recalling long or complex commands or entries,
including access lists.
history buffer. This feature is particularly useful for recalling long or complex commands or entries,
including access lists.
To display commands from the history buffer, enter the show history command as follows:
RP/0/RP0/CPU0:router# show history
show configuration history commit
show configuration commit list