Tip: Keep a command out of your history
October 13, 2009, 3:43 pm
terminal.png
If you want an easy way to keep commands out of your ~/.bash_history, do the following:
put this in your .bashrc:
export HISTCONTROL=ignorespace
then in a new bash session when you type in a command, if you put a space before it, it doesn’t appear in your history.
$echo hello #in history
$ echo hello #not in history