Click to See Complete Forum and Search --> : Linux History


noe
04-18-2001, 03:07 AM
How in Linux when I logged in and did something in there, no one can't see what I've done in .bash-history file, especially in history command.
Thanx.

-N0E-

kernel.panic
04-18-2001, 03:30 AM
Originally posted by noe:
<STRONG>How in Linux when I logged in and did something in there, no one can't see what I've done in .bash-history file, especially in history command.</STRONG>

Woah...I'll do my best here...
the history command just reads from ~/.bash_history so if you set a line in, say, .bashrc that says "echo 1&gt;~/.bash_history"
Then whenever you login it will clear the history file. Of course, you can manually do that anytime you need.

noe
04-18-2001, 06:55 AM
thanx, It works well.
But also I want to do it when I logged in as root (using su command).
So it only affect only to my user account and not erase all root history.