You are here: Home > CLI Commands > Command Line Editing

Command Line Editing

The system records your most recently entered commands. You can review the history of your actions, or reissue a recent command easily, without having to retype it.

To view items in the command history, use the up arrow key to move back through the list and the down arrow key to move forward. To reissue a specific command, press Enter when the command appears in the command history. You can even use the command line editing feature to make changes to the command prior to entering it. The command line editing feature allows you to make corrections or changes to a command without retyping. Table 1 lists the editing controls. To use key shortcuts, press and hold the Ctrl button while you press a letter key.

Table 1: Line Editing Keys

Key

Effect

Description

Ctrl A

Home

Move the cursor to the beginning of the line.

Ctrl B or the left arrow

Back

Move the cursor one character left.

Ctrl D

Delete Right

Delete the character to the right of the cursor.

Ctrl E

End

Move the cursor to the end of the line.

Ctrl F or the right arrow

Forward

Move the cursor one character right.

Ctrl K

Delete Right

Delete all characters to the right of the cursor.

Ctrl N or the down arrow

Next

Display the next command in the command history.

Ctrl P or up arrow

Previous

Display the previous command in the command history.

Ctrl T

Transpose

Swap the character to the left of the cursor with the character to the right of the cursor.

Ctrl U

Clear

Clear the line.

Ctrl W

Delete Word

Delete the characters from the cursor up to and including the first space encountered.

Ctrl X

Delete Left

Delete all characters to the left of the cursor.

/*]]>*/