Clear Operation Records in Linux

Source: Internet
Author: User
Article Title: Clear Operation Records in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
In Linux, when operating on a terminal or in text mode, you only need to press the up/down cursor key to quickly call previous commands, however, other users will also know your operations after logging on to the same user. In addition, in the Linux GUI, for example, GNOME, the option to open the most recent document on the panel menu lists all the files used by the most recent users. How to clear these two attributes?

1) This attribute is attributed to different users. The preceding attribute can only be used after the same user logs on.

2) each user's root directory contains two hidden files:. bash_history and. recently-used. The former records the commands used in all terminals and text methods, and the latter records the files accessed.

3) as described above, you can clear the above records by clearing the two files in the user directory. For example, if my machine often uses root logon (a bad habit), you only need to add the following two sentences to the/etc/rc. d/rc/local file:

>/Root/. bash_history
>/Root/. recently-used

In this way, the two files will be automatically cleared each time the system is started to clear the above operation records.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.