3 ms·
Only tangentially related, but if you prefix the command with a space, it doesn't get recorded to history. $ cd $ echo "one" one $ e
by psadauskas 4y ago
Only tangentially related, but if you prefix the command with a space, it doesn't get recorded to history.
$ cd
$ echo "one"
one
$ echo "two"
two
$ echo "three"
three
$ history | tail -3
10089 cd
10090 echo "one"
10091 echo "three"
When you remember to do it, that is.
- bpeebles 4y agoThat is the default on many Linuxes' bashes but it's not universal and you can turn it on or off using HISTCONTROL: https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html https://www.gnu.org/software/bash/manual/html_node/Bash-Vari...
- yencabulator 4y agoMeanwhile, `ps` etc will still show the secret. Just do it the right way.