As we are doing more and more commands at the bash-prompt it's time to learn a neat little trick:
As you are at an empty prompt press the "arrow-up" key and you will see the previous command you typed in !
Press again, and again, and again, see all the commands that were stored in the "bash-history"
As current user you will only see the commands you typed in, as root you will see the commands you typed in as root.
More fun, type in:
CODE
$ history
And you'll get a full numbered list of all stored commands
CODE
$ !8
Will get you number 8 of that list
CODE
$ !v
And you will get the last command that started with v
Ctrl+R will let you do a search in the history
Bash history won't be lost at reboot or shutdown, clever isn't it ?
Categories
- GNU/Linux (20)
- Linux Security (12)
- Ubuntu Tutorials (20)
- Web Browsers (1)
- Windows 2000 (20)
- Windows 2003 (13)
- Windows 7 (8)
- Windows Vista (43)
- Windows XP (54)
Bookmark us
Wednesday, October 1, 2008
BASH HISTORY
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment