How to clear user logon records and command history in Linux
Source: Internet
Author: User
[Root @ localhostroot] # echo & gt;/var/log/wtmp # garbled characters are cleared when the file is opened by default, ip address and other information can be found [root @ localhostroot] # last # at this time, the user login information cannot be found to clear the logon system failure record [root @ loca...
[Root @ localhost root] # echo>/var/log/wtmp # garbled characters are cleared when the file is opened by default, ip address and other information can be found [root @ localhost root] # last # user logon information cannot be found at this time to clear records of system logon failures [root @ localhost root] # echo>/var/log /btmp # garbled characters when this file is opened by default, you can find the logon failure information [root @ localhost root] # lastb # The logon failure information cannot be found. clear the historical execution command [root @ localhost root] # history-c or, clear the file in the user directory to [root @ localhost root] # echo>. /. bash_history 1.vi/root/history # Create a record file. history-c # Clear Record 3. history-r/root/history.txt # import record 4. history # query the import result www.2cto.com example [root @ localhost root] # vi/root/history [root @ localhost root] # history-c [root @ localhost root] # history-r/ root/history.txt [root @ localhost root] # history 1 echo>/var/log/wtmp 2 last3 echo>/var/log/btmp4 lastb 5 history-c 6 echo>. /. bash_history7 history author akingde
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