Tuesday, September 21, 2010

Command-Line Editing Keys

IOS provides a number of keyboard shortcuts that let you edit the line you're typing. They should be familiar to any user of Unix or Emacs. Table 1-1 lists the command-line editing keys.
Table 1-1. Command-line editing keys
Keys
Commands
Ctrl-a
Returns the cursor to the beginning of the current line.
Ctrl-b
Moves the cursor back one character. (Equivalent to the left arrow key.)
Ctrl-d
Deletes the character to the left of the cursor.
Ctrl-e
Moves the cursor to the end of the line.
Ctrl-f
Moves the cursor forward one character. (Equivalent to the right arrow key.)
Ctrl-k
Deletes all the characters from the current cursor position to the end of the line.
Ctrl-n
Goes to the next command in the session history. (Equivalent to the down arrow key.)
Ctrl-p
Goes to the previous command in the session history. (Equivalent to the up arrow key.)
Ctrl-t
Switches the current character with the character to the left of the cursor.
Ctrl-r
Redraws or redisplays the current line.
Ctrl-u
Clears the line.
Ctrl-w
Deletes the word to the left of the cursor.
Ctrl-x
Deletes from the cursor position to the beginning of the line.
Ctrl-y
Pastes the most recently deleted characters to the current cursor position.
Ctrl-z
Exits the current configuration mode and returns to the previous configuration mode.
Tab
Tries to finish the current command. (Command completion.)
Up arrow
Moves back through the history of commands.
Down arrow
Moves forward through the history of commands.
Left arrow
Moves the cursor to the left.
Right arrow
Moves the cursor to the right.
Ctrl-^, then x
Aborts the sequence. Breaks out of any executing command.

No comments:

Post a Comment