Ed Greshko wrote:
On 04/29/2012 07:44 AM, Peter Gueckel wrote:
> Andy Blanchard wrote:
>
>> What you want is:
>>
>> export HISTCONTROL=erasedups
> It looked promising, but it doesn't work. I logged out and back in twice,
> then even completely turned off the computer and back on again, but when
> I examine the .bash_history file, it is riddled with duplicate commands.
>
I didn't do that much testing.....being summoned for breakfast. But, it
seemed to work fine for me.
I did 5 cat /etc/hosts followed by 5 ls /tmp and then repeated the cycled.
Logged out and Logged in and did a cat .bash_history.
The last few lines were....
vi .bash_profile
ls /etc
history
ls
cat .bash_history
cat /etc/hosts
ls /tmp
I'm thinking you have to start with an empty file. As was said in a former
post, it
doesn't work retroactively.