Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am a system administrator in Linux in my company.
Now, after I login to root, I just discovered that Linux will remember what I enter ask for it to do in the history. Whatever I logout and login again the history still in here.
Originally posted by explorer1979 Hi all,
I am a system administrator in Linux in my company.
Now, after I login to root, I just discovered that Linux will remember what I enter ask for it to do in the history. Whatever I logout and login again the history still in here.
How to del all history before logout?
I guess you're comming from Windows/DOS world, and this is your first *NIX encounter.
del, well there is no del command in *NIX you can mimic it by aliasing 'rm -f' command though.
rm -f ~/.*_history
will remove history file for the current user only.
Yup. Although I probably wouldn't put the wildcard in. Lots of programs use hidden files in your home directory, and wiping out everything that ends in _history is a bit too heavy handed to my way of thinking.
Another way, if you don't mind having *no* history as root whatsoever, is a var called HISTSIZE, export from /etc/profile:
if [ "$UID" = "0" ]; then export HISTSIZE="0"; fi, or just link the trashcan: if [ "$UID" = "0" ]; then ln -sf /dev/null /root/.bash_history; fi or use your /root/.bash_logout to rm -f /root/.bash_history
Mind you, if you're hiding stuff and have people in the wheel group you'd better use secure wipe because if one has privileges to dd the partition chances are they can retrieve at least parts of any file deleted as well.
Yeah, if you use secure delete apps, overwrite with data, mind the exeptions and don't have fragments of the file on swap etc etc, yeah I guess you can be sure ppl will have a very hard time reconstructing it. Tho if you start shredding files *now* there's still a chance there are fragments around from older "versions" of the file which could be retrievable with, say, TCT.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.