You can recall commands you have used before, even in previous sessions.
Command |
Description |
---|---|
↓ |
Recall previous command. |
↑ |
Recall next command. |
|
Show the last 100 commands. |
|
Run the last command. |
|
Run a specific previous command: the |
|
Run the For example, entering |
|
Run the most recent command that starts with |
|
Run the most recent command containing You may omit the trailing |
|
Repeat the last command, replacing |
You can combine word designators with history commands to refer to specific words used in previous commands. Words are numbered from the beginning of the line with the first word being denoted by 0
(digit zero). Use a colon (:) to separate a history command from a word designator. For example, you could enter !!:1
to refer to the first argument in the previous command. In the command show interfaces
, the interfaces
is word 1.
Word Designator |
Meaning |
---|---|
|
The operation word. |
|
The |
|
The first argument; that is, word 1. |
|
The last argument. |
|
The word matched by the most recent |
Immediately after word designators, you can add a sequence of one or more of these modifiers, each preceded by a colon:
Modifier |
Meaning |
---|---|
|
Print the new command, but do not execute. |
|
Replace |
|
Apply changes over the entire command. |