No duplicates in bash history
We can use a bash variable HISTCONTROL to turn off duplicates in bash history. It can be one of three values:
HISTCONTROL='ignoreups'means to not enter lines which match the last entered lineHISTCONTROL='ignorespace'means to not enter lines which begin with a space or tab into the history listHISTCONTROL='ignoreboth'does both
We can export it in bashrc
export HISTCONTROL='ignoreboth';
One Response to “No duplicates in bash history”
Leave a Reply
You must be logged in to post a comment.
December 6th, 2004 at 12:55 am
HISTCONTROL value should be ‘ignoredups’ not ‘ignoreups’