clear history from shell
MR ZenWiz
mrzenwiz at gmail.com
Wed May 18 21:53:06 UTC 2016
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.
Another option you can try is 'unset HISTFILE' in your bash script.
This explicitly prevents bash from saving any history to a file. If
this is done at the terminal window and you subsequently exit the
terminal, all that window's history is lost.
Hope that helps.
MR
More information about the ubuntu-users
mailing list