1. List last n commands
history n
2. Execute cmd No.n
!n
3. Execute last cmd
!!
or
!-1
4. Execute command n times before
!-n
5. Execute the last cmd that starts with "string"
!string
6. Execture the last cmd that contains "string"
!?string?
7. Execute the "commandName" with any args you used on your last cmd
commandName !*
Use Ctrl-R then type the command name you used last time, you will see a console window like:
(reverse−i−search)`':
http://xxxxxx/Linuxjc/1162743.html TechArticle