Saturday, May 4, 2013

Execute a command without saving it in the history




Prepending one or more spaces to your command won't be saved in history.
It i very useful for hiding your commands which consists of passwords on the commandline.
This is tested in bash shell and works successfully.

Example :
$ 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

The manual

No comments:

Post a Comment