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