Clear BASH history
To prevent a command from being added to the history in the first place, make sure that the environment variable HISTCONTROL contains among its colon-separated values the valueignorespace, for example (add e.g. to .bashrc): $ export HISTCONTROL=ignorespace This will prevent any command with a leading…