! Use of:
1 、!! : Represents the previous command, as follows:
Example one:
./some-shell-command
Cat!! (equivalent to Cat./some-shell-command)
Example two:
Cd/user
!! (equivalent to Cd/user)
2.!$: Represents the last parameter in the previous command, as follows:
Example one:
Cd/user
CD!$ (equivalent to Cd/user)
3.!STR: Represents the most recent command in the history command that begins with STR, as follows:
Example one:
Ipconfig
!STR (equivalent to ipconfig)
4 、!? STR: Represents the most recent command in the history command that contains STR, as follows:
Example one:
Cd/usr/java/workspace/server/webroot/web-inf/classes
!? /usr?
5,!n and!-n: The former represents the history command, which shows the previous number of entries as N, which represents the last Nth command in the historical command line. The former is the nth of the historical command line, and the latter is the last nth.
6, re-execute the previous name has the following methods:
Use the UP ARROW key and enter to execute.
By!! and enter the execution.
Enter!-1 and return to execute.
Press Ctrl+p and enter to execute.
The usage of Linux!