By default, history is stored in ~/.bash_history file. Add the following line to the .bash_profile and relogin to the bash shell, to store the history command in .commandline_warrior file instead of .bash_history file. I’m yet to figure out a practical use for this. I can see this getting used when you want to track commands executed from different terminals using different history file name.
# vi ~/.bash_profile HISTFILE=/root/.commandline_warrior
Comments on this entry are closed.
This is useful for when you want to relocate your history file outside of your home directory. There’s a variety of practical applications. This is required on certain platforms like HP-UX when you’re using an NFS mounted home filesystem. Also handy when you want your history erased between reboots; mount /tmp as tmpfs in RAM, and put your bash history file on /tmp.
This is used, when you don’t want user to access his history files and want to keep it for audit purpose.