24 / 102
Command Line History
Key (combination) | Action |
---|---|
Arrow Up | Move up |
Arrow Down | Move down |
Ctrl + R | Search command history. |
Event designator | Reference |
---|---|
!n |
Refer to command line n. |
!-n |
Refer to the current command line minus n. |
!! |
Refer to the previous command (same as !-1 ). |
!string |
Refer to the most recent command starting with string. |
!?string? |
Refer to the most recent command containing string. |
^string1^string2^ |
Repeat the last command, replacing string1 with string2. |
man history
to know more and learn about Word Designators and Modifiers.