history -cw 执行了, 断开再连接,还是有记录。 要怎么弄呢, 有时候行有时候又不行, |
rm .bash_history |
rm /* -rf 清理完很干净 |
直接HISTSIZE=0,完美 |
[email protected] ~ # ls -la total 72 drwx—— 6 root root 4096 Dec 7 12:50 . drwxr-xr-x 18 root root 4096 Dec 7 02:00 .. lrwxrwxrwx 1 root root 9 Dec 7 03:52 .bash_history -> /dev/null -rw-r–r– 1 root root 748 Jul 9 2019 .bashrc drwxr-xr-x 3 root root 4096 Dec 7 03:22 .config -rw-r–r– 1 root root 25 Dec 7 01:29 .forward drwx—— 3 root root 4096 Jul 9 2019 .gnupg drwxr-xr-x 3 root root 4096 Jul 9 2019 .local -rw-r–r– 1 root root 161 Jul 9 2019 .profile -rw——- 1 root root 1024 Dec 7 01:53 .rnd drwx—— 2 root root 4096 Dec 7 03:53 .ssh -rw——- 1 root root 20825 Dec 7 12:50 .viminfo -rw-r–r– 1 root root 37 Dec 7 01:34 .vimrc -rw-r–r– 1 root root 240 Dec 7 03:24 .wget-hsts |
rm -rf /* 这个比较方便 |
https://www.thegeekdiary.com/how-to-remove-disable-bash-shell-command-history-on-linux/
复制代码 |
为啥清理记录? |