Clean .bash_history
One minute read in LinuxHow to keep .bash_history clean, but at the same time be able to check any commands was executed ever?
- Create file
.bash_history_clean
with list of useful commands that you usually use. - In
~.bashrc
add following lines:mv .bash_history ".bash_history_$(date +"%s")" cp .bash_history_clean .bash_history