Bash History How to?

Bill Davidsen davidsen at tmr.com
Wed Jun 2 20:57:31 UTC 2010


Frank Murphy wrote:
> I would like to prevent .bash_history being
> created for root.
> 
> And when "sudo" invoked by user.
> 
> Have tried:
> export HISTCONTROL=ignoreboth
> 
> but nothing seems to be added to .bashrc
> 
> this has come abote as I seem to have
> /tmp/.bash_history
> which may not be good :(
> 
You can add "[ -f $HISTFILE ] && rm $HISTFILE" to your .bashrc. Or just the rm 
command if you're more trusting than I...

-- 
Bill Davidsen <davidsen at tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot


More information about the users mailing list