2-7
Catalyst 6500 Series Switch Software Configuration Guide—Release 8.7
OL-8978-04
Chapter 2 Command-Line Interfaces
Catalyst Command-Line Interface
History Substitution
The history buffer stores the last 20 commands that you entered during a terminal session. History
substitution allows you to access these commands without retyping them by using special abbreviated
commands. Table 2-4 lists the history substitution commands.
Table 2-3 Command-Line Editing Keyboard Shortcuts
Keystroke Function
Ctrl-A Jumps to the first character of the command line.
Ctrl-B or the left arrow key Moves the cursor back one character.
Ctrl-C Escapes and terminates prompts and tasks.
Ctrl-D Deletes the character at the cursor.
Ctrl-E Jumps to the end of the current command line.
Ctrl-F or the right arrow key
1
1. The arrow keys function only on ANSI-compatible terminals such as VT100s.
Moves the cursor forward one character.
Ctrl-K Deletes from the cursor to the end of the command line.
Ctrl-L; Ctrl-R Repeats the current command line on a new line.
Ctrl-N or the down arrow key
1
Enters the next command line in the history buffer.
Ctrl-P or the up arrow key
1
Enters the previous command line in the history buffer.
Ctrl-U; Ctrl-X Deletes from the cursor to the beginning of the command line.
Ctrl-W Deletes the last word typed.
Esc B Moves the cursor back one word.
Esc D Deletes from the cursor to the end of the word.
Esc F Moves the cursor forward one word.
Delete key or Backspace key Erases the mistake when entering a command; reenter the command
after using this key.
Table 2-4 History Substitution Commands
Command Function
Repeating recent commands:
!!
Repeat the most recent command.
!-nn
Repeat the nnth most recent command.
!n
Repeat the command n.
!aaa
Repeat the command beginning with the string aaa.
!?aaa
Repeat the command containing the string aaa.
To modify and repeat the most recent command:
^aaa^bbb
Replace the string aaa with the string bbb in the most recent command.
To add a string to the end of a previous command and repeat it:
!!aaa
Add the string aaa to the end of the most recent command.
!n aaa
Add the string aaa to the end of the command n.