clear history from shell
Grizzly
Real_Grizz_Adams at yahoo.co.uk
Thu May 19 05:51:51 UTC 2016
Wednesday, May 18, 2016 at 14:53, MR ZenWiz wrote:
Re: clear history from shell (at least in part)
>On Mon, May 16, 2016 at 9:08 AM, Grizzly <Real_Grizz_Adams at yahoo.co.uk> wrote:
>> It would be nice if there were a "Unique" switch for history so if a command
>> has been used before (or maybe was executed from history itself) its not added
>> to list again, just a thought
>
>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?
More information about the ubuntu-users
mailing list