“!”
Command Name | ! |
|
Description | Repeats the command in the history list identified by <command- | |
| reference>. | |
| !! | – repeats the last command executed. |
| !<n> | – repeats the command in the history list as sociated |
|
| with reference number <n>. |
| !<str> | – repeats the most recent command that begin s with |
|
| the string <str>. |
| Any | |
| referenced command prior to its execution. | |
Syntax | !<n> |
|
| !<str> |
|
Parameters | N |
|
| It is the reference number of the command from history list | |
| that has to be repeated. | |
| Str |
|
| The most recent command from the history list that begins with | |
| keyword str. | |
Examples | ||
| ||
| Referenced command is not in the history list. | |
| ||
| Referenced command is not in the history list. | |
| ||
| Referenced command is not in the history list. | |
| ||
| admin | with privilege of Administrator |
| here comes the usage of “ !” command | |
| ||
| whoami | |
| admin | with privilege of Administrator |
| ||
| The above command will execute the second command, which is | |
| available in history list. | |
| ||
| The above command will execute the latest command in the history list | |
| that starts with system. | |
NOTES |
|
|
“$”
Command Name | $ |
Rev. 051208 | page 100 of 152 |