clear history from shell
Grizzly
Real_Grizz_Adams at yahoo.co.uk
Thu May 19 10:54:12 UTC 2016
Thursday, May 19, 2016 at 8:20, Ralf Mardorf wrote:
Re: clear history from shell (at least in part)
>On Thu, 19 May 2016 06:51:51 +0100, Grizzly wrote:
>>Wednesday, May 18, 2016 at 14:53, MR ZenWiz wrote:
>>Re: clear history from shell (at least in part)
>>>That's what the HISTCONTROL=erasedups is supposed to do.
>>>In my experience, this doesn't always (or often) work - I get scads of
>>>duplicate entries within in terminal window, but I have mine set to
>>>HISTCONTROL=ignoreboth:erasedups. I'm not sure that works too well
>>>either.
>>From what I have read (but not tested), it only works with consecutive
>>commands i.e.
>>Apt-get update
>>Apt-get update
>>
>>would storee one Apt-get update
>>but
>>Apt-get update
>>Apt-get dist-upgrade
>>Apt-get update
>>Apt-get dist-upgrade
>>would store them all?
>What was your source of reading?
I read the text you qouted
"A value of ignoredups causes lines matching the previous history entry to not
be saved"
I took that to mean "The" previous (singular) entry, after testing it works as
I expected (as above)
I did miss the distiction bewteen and have tested erasedups now and it "seems"
to do what I want, the most current use of a command is saved to history
>I didn't test it either, because I prefer to use a default history for
>the very good reasons I already pointed out, but assumed I would like
>to have another history, I would test it. Anyway, you are confusing
>"erasedups" and "ignoredups".
>A value of erasedups causes all previous lines matching the current line to be
>removed from the history list before that line is saved. Any value not
>in the above list is ignored.
More information about the ubuntu-users
mailing list