Stop history from recording a command

You know that you can “skip” a command to be recorded by the history by setting HISTCONTROL to ignorespace AND typing a space in front of the command. In this manner you can hide a command that you had just executed on the machine. (here comes that smile… 🙂 )

Just take this example:

STEP #1. export HISTCONTROL=ignorespace
STEP #2. now give all the commands you don’t mind to be recorded by history.
STEP #3. If u want a command not to be recorded by history. Just press “space” and then give the command. It will not be recorded by the history.

stop history from recording a command.

Advertisements