Bash Bang (!) commands(bash的“!”命令,重新运行前一个命令的全部或部分。)
Re-run all or part of a previous command.
Syntax
!! Run the last command again
!foo Run the most recent command that starts with 'foo' (e.g. !ls)
!foo:p Print out the command that !foo would run
also add it to the command history
!$ Run the last word of the previous command (same as Alt + .)
!$:p Print out the word that !$ would substitute
!* Run the previous command except for the last word
!*:p Print out the previous command except for the last word
^foo^bar Run the previous command replacing foo with bar

浙公网安备 33010602011771号