清除Linux登录记录

CentOS

cat /dev/null > /var/log/wtmp
cat /dev/null > /var/log/btmp
cat /dev/null > /var/log/lastlog
cat /dev/null > /var/log/secure
history -cw

Ubuntu

cat /dev/null > /var/log/wtmp
cat /dev/null > /var/log/btmp
cat /dev/null > /var/log/lastlog
cat /dev/null > /var/log/auth.log
history -cw

 

posted @ 2021-09-07 19:48  神经蛙  阅读(182)  评论(0编辑  收藏  举报