[Techtalk] duplicate bash history entries
Dennis Wheeler
dennis.wheeler at vidiator.com
Mon Sep 13 09:25:55 EST 2004
> -----Original Message-----
> From: aec [mailto:brat at magma.ca]
>
>
> Hi,
> I have my ~/.bash_profile set to source ~/.bashrc ; inside bashrc,
> I have the line :
>
> export HISTCONTROL=ignoredups
>
> yet my history file is full of duplicate commands,
> is there something else i need to do to have only
> unique commands stored in my history file?
>
> This is is on Debian Sid.
>
> thanks!
> --
> Angelina Carlton
>
According to the man page, it appears it only compares the current
command to the previous one. So two 'ls' in a row, and only one is
remembered, but do an 'ls' followed by a 'cd' and another 'ls' and
you'll have both 'ls' in the history.
Not a very useful setting if that's true.
You might have more luck with HISTIGNORE instead
-- Dennis
More information about the Techtalk
mailing list