Page 1 of 1

How to avoid a command to be logged in bash's history

Posted: Mon Jan 20, 2014 3:11 pm
by ^rooker
Accidentially, I just stumbled over an interesting behavior of bash:

When a command starts with a "space" character (0x20), it does not show up in bash's history when you do a "cursor up" or "Ctrl+R" search.
I haven't yet verified if it's also not written to .bash_history, but we'll see...


Anyways, I'm posting this because I think it might be handy sometimes to issue commands and not have them logged ;)