Stimmt, der Befehl alleine reicht nicht aus. Bin dabei noch auf diese Möglichkeit gestoßen.
Scheint auf den ersten Blick tatsächlich Duplikate zu löschen.
Code
HISTCONTROL=ignoredups:erasedups
shopt -s histappend
PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND"
Quelle + ausführliche Erklärung
Bash history: "ignoredups" and "erasedups" setting conflict with common history across sessions
First of all, this is not a duplicate of any existing threads on SE. I have read these two threads (1st, 2nd) on better bash history, but none of the answers…
unix.stackexchange.com