This site says that on Linux you can add a space
before a terminal command to keep it out of .bash_history
.
This does not seem to work for Mac OS X. Does anyone know of a way to execute a single command on the Terminal without saving it to history?
I don't want to clear the history.
Best Answer
Add the following line to ~/.bashrc
Then
source ~/.bashrc
to refresh the settingsThis should enable that feature in bash. If it doesn't work, you might have to add it to ~/.bash_profile instead of ~/.bashrc since OS X loads them a bit differently than linux I think.