Linux系统记录清除

清除登陆记录:

    直接清空记录文件

    cat /dev/null > /var/log/wtmp

清除历史记录:

    直接清空记录文件

    cat /dev/null > /root/.bash_history                 ---  root

    cat /dev/null > /home/user/.bash_history       --- other

    或 history -cw

评论

暂无评论