Execute a command without saving it in the history

‘spacebar’ command
This is sample output – yours may be different.

$ echo this goes to history
this goes to history

$ echo this wont go to history
this wont go to history

$ history
1 echo this goes to history
2 history

Prepending one or more spaces to your command won’t be saved in history.
Useful for passwords on the commandline.
Tested on BASH.

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.