Wednesday 28 January 2009

Terminal History

Just a short and quick how to here on viewing and deleting the history in the terminal.
By default, up to 500 commands that you have used are saved into a hidden file ( ~/.bash_history). You can access these commands by using your up/down keys on your keyboard - which makes it easy to retrieve and reuse them. To view all the entries within the history, run the command
history

This will then display each entry within the .bash_history file. IF you are wanting to clear your history, rather then deleting all the information within the above file, just use the command:
history -c

If you have a number of different users on your laptop / pc, you will need to run this command on each user account.

No comments:

Post a Comment