gordonmann
asked on
How to remove the entries in the "history" file from the command line
Ou company allows several users access to the root user on our systems. The problem I am havong is they are "experimenting" with commands that I have had to use to correct errors. How can I either 1) prevent logging from specific users or 2) erase the history log. I prefer option 1.
ASKER
Everyone su to root
What if I just want a separate history file for myself BUT still want the ability to view what other users have done while logged in as root.
What if I just want a separate history file for myself BUT still want the ability to view what other users have done while logged in as root.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great help!!!
To remove the bash history, just do
rm -f ~/.bash_history
You can have separate history files based on whatever criteria you come up with (eg: login name, terminal name, IP address etc).
For example, to have a separate history file based on the tty name, put the following in ~/.bash_profile
export HISTFILE=$HOME/.bash_histo