The same command is listed in my history again and again. How can I avoid this? I know it's possible via HISTCONTROL
but I haven't found the right way.
Ubuntu – How to avoid duplicate entries in .bash_history
bashhistory
Related Question
- Ubuntu – History list without timestamp and unique the results
- Ubuntu – How to view the `.bash_history` file via command line
- Ubuntu – Up arrow and .bash_history have different commands, so where does the up arrow get its data
- Ubuntu – How to delete bash_history for current day only
- Ubuntu – Deleting history from ~/.bash_history
- Ubuntu – How to see time in ~/.bash_history file
Best Answer
From the
bash
man page:So put the following line in your
~/.bashrc
:export HISTCONTROL=ignoreboth:erasedups