This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to

clear bash history immediately

Added by over 3 years ago

For some reason you may want to clear the history of a shell session immediately. You may empty the file .bash_history but that iznot enough. Let's try the following commands:

$ export HISTSIZE=0; export HISTSIZE=100

If you want a shortcut

$ alias history_flush='export HISTSIZE=0; export HISTSIZE=100'

I guess there're some more official ways but I love my way ;) In fact, if you use HISTSIZE=5 you may clear all history items but the last 5 ones.