3 ms·
You're probably aware of it, but anyway... Put HISTCONTROL='ignoreboth:erasedups' In your .bashrc - now duplicate commands (two consecutive commands that
by pooriaazimi 14y ago
You're probably aware of it, but anyway... Put
HISTCONTROL='ignoreboth:erasedups'
In your .bashrc - now duplicate commands (two consecutive commands that were the same) are not included in HISTFILE, and also if you type " some-sensitive-command username password host" (note the extra space at the beginning), they too won't be include in HISTFILE.
http://serverfault.com/q/48769 http://serverfault.com/q/48769
http://serverfault.com/q/241154 http://serverfault.com/q/241154