Linux clear login and history log

Clear login log
[[email protected] root]# echo > /var/log/wtmp #can view ip and etc..
[[email protected] root]# last #now, we can’t view the user login record
Clear login failure log
[[email protected] root]# echo > /var/log/btmp # we can view the failuew login record
[[email protected] root]# lastb # log clear
Clear history command record
[[email protected] root]# history -c
or clear the file of bash_history in user folder
[[email protected] root]# echo > ./.bash_history /root/history #creat new log file
2.history -c #clear history
3.history -r /root/history.txt #import record
4.history #query the import result
clear history
[[email protected] root]# vi /root/history
[[email protected] root]# history -c
[[email protected] root]# history -r /root/history.txt
[[email protected] root]# history
1 echo > /var/log/wtmp
2 last
3 echo > /var/log/btmp
4 lastb
5 history -c
6 echo > ./.bash_history
7 history
author: akingde

Readers Comments (1)

  1. Heу ɡuys, I have a question! I am going to be startіng
    up an online vape store using Shopify. I wanted to know if anyone has սsed
    vaape mɑrketing? I will probably purchase soome vapiing backlinkѕ
    frⲟm The Eliquid Boutique. Will these links help me to rank?.
    I think this iѕ their site Wһyy is it becoming so difficultt tto rank an online vape shoρ lol


Leave a comment

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.