User Tools

Site Tools


Sidebar


guides:unix_admin:history_command

History Command

1. display command history by

history

2. display command history with time by

export HISTTIMEFORMAT='%F %T '
history

3. Search history by Control-R and use either left or right arrow to edit

4. Display previous command by Control-P

5. View previous commands by up arrow

6. Execute previous commands by

Execute last command by !!

!!

Execute previous command by ! and the command number

!1234

Execute previous command that starts with a specific word by ! followed by starting few letters of command

!screen

References

http://www.thegeekstuff.com/2008/08/15-examples-to-master-linux-command-line-history/

guides/unix_admin/history_command.txt · Last modified: 2010/09/12 00:24 by michaelc