clear history from shell
Karl Auer
kauer at biplane.com.au
Mon May 16 23:52:17 UTC 2016
> 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
There is such a switch - see HISTCONTROL in "man bash".
> "history -c" clears the current session's history not what's already
> in .bash_history. Thanks.
One option would be to set up a cron job that just deletes (or, if you
are really paranoid, shreds) ~/.bash_history at regular intervals. The
history is stored in memory until you exit the shell, so you will still
have the history available to you until you exit the shell.
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389
GPG fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
Old fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4
More information about the ubuntu-users
mailing list