Shell Productivity Tips and Tricks
> If you want to remove a sensitive command from your history, you can simply edit your $HISTFILE history file and remove it.<p>It’s already too late at this point. Anybody on your machine can read the commands you are running, for example with ps. You should instinctively avoid entering anything in plaintext into a terminal which you don’t want other people to see. Any command line tool worth its salt will provide alternative ways of passing secrets (using configuration files for example).