!在
sh、Bash、Zsh、rbash和ksh中重複使用和擴展 shell 歷史記錄。 另請參閱:^。 更多資訊:https://gnu.org/software/bash/manual/bash.html#Event-Designators。
sudo 執行:sudo !!
history 中指定行號的命令進行替換:!{{number}}
number 條的命令進行替換:!-{{number}}
!{{string}}
{{command}} !*
{{command}} !$
!:-
!{{string}}:p