Sunday, January 31, 2010

How to delete linux, unix or mac OS X bash commandline history ?


You wanted to delete your bash or command line history this can be easily done in few steps. The commandline or bash history is first of all stored in a temporary location i.e in ram then it is stored in ~/.bash_history just after you exsit the session. Now in order to fully delet the bash history one need to delete the history from both locations.

1. Delete bash history

Simply type this command

$ rm -rf ~/.bash_history

2. Delete current hisrtory stored in ram.

# history -c

No comments:

Post a Comment