Given the syntactic complexity and advanced typing skills involved with some of these command lines, you are likely to commit syntax errors or simply tire of retyping commands that you already typed just a few moments previously. At that point you will appreciate the ability to recall previous command lines and edit them. To cycle backwards through the last 25 command lines, hit Ctrl+R (typically the same as the Page-Up key). To cycle forwards through them, hit Ctrl+T (page-down). Once you find the previously-typed command line, you can re-execute it just by hitting Enter. If instead of just re-executing it as is, you prefer to edit it first, you can do so using the following keystrokes:
Primary |
Alternate |
Editing Action |
ctrl+a |
|
Move cursor to previous word |
ctrl+c |
|
Abort the current line (start a new one). |
ctrl+d |
delete |
Delete the character under the cursor |
ctrl+f |
insert |
Insert a space under the cursor |
ctrl+h |
LeftArrow |
Move cursor to the left |
ctrl+l |
RightArrow |
Move cursor to the right |
ctrl+n |
|
Move cursor to the end of the line |
ctrl+q |
|
Toggle insert/replace mode |
ctrl+r |
PageUp |
Cycle through the previously typed ten command lines. |
ctrl+t |
PageDown |
Cycle forward through the previously typed ten command lines (after having used ctrl+r to go backwards). |
ctrl+u |
|
Move cursor to start of command line |
ctrl+w |
|
Move cursor to next word |
ctrl+y |
|
Delete line to the right of the cursor |