Clearing the record of operation information under Linux system

  
Under Linux, if you are in the terminal or in text mode operation, just press the up and down cursor keys to quickly call the previous command, but other people will know you after logging in with the same user. The operation. In addition, in the Linux graphical interface, such as GNOME, there is an option to open the recent document on the menu of the panel, listing all the files used by the most recent users. How to clean up these two properties?


1) This attribute belongs to different users, and the above attributes can only be used after the same user logs in.
2) There are two hidden files in the root directory of each user: .bash_history and .recently-used. The former records all the commands used in the terminal and text mode; the latter records the files that have been accessed.

3) Through the above introduction, you can know that you can clear the above records by clearing the two files below the user directory. If my machine is commonly used for root login (a very bad habit), just add the following two sentences to the /etc/rc.d/rc/local file:


> /root/.bash_history
>/root/.recently-used


This will automatically clear the two files each time you turn it on, thus clearing the above operation record.

Copyright © Windows knowledge All Rights Reserved