New answers tagged command-history
Although this has been answered, I think this is also worth noting - if you wanted to, you could remove your .bash_history file, and add a symlink with the same name pointing to /dev/null. That would produce the same results - in fact, this solution is shell-agnostic (as long as you target the correct history file. All you need is this: ln -s /dev/null ...
It depends from the shell you are using. From the command you give it seems you are working with a bash shell. In this case you can both use HISTSIZE=0 or HISTFILE= With the first one (HISTSIZE=) you put to zero the size of the history for the current shell. This means that after this command you will have no answer from history or pushing UP, ...
Single commands can be omitted from history (and up/down recall) by prepending with a space: $ echo "foo" # saved $ echo "bar" # <-- not saved Otherwise, you can turn off history by adding to ~/.bashrc: set +o history (to reenable, use set -o history) If you want to disable it for the current session only: $ unset HISTFILE
Top 50 recent answers are included