Don't store specific commands in history
To force bash not to save duplicate commands, edit .bash_profile that is located in your home directory:
vi ~/.bash_profile
export HISTCONTROL=ignoredups
To force bash not to save lines that start with a space, edit .bash_profile that is located in your home directory:
vi ~/.bash_profile
export HISTCONTROL=ignorespace
To force bash not to save both(space and duplicates), edit .bash_profile that is located in your home directory:
vi ~/.bash_profile
export HISTCONTROL=ignoreboth
No comments:
Post a Comment