扫码关注官方订阅号
终端运行每个命令都会记录下来,每次运行以后,运行history都能看到运行记录。 能不能不要让终端记录的操作。
小伙看你根骨奇佳,潜力无限,来学PHP伐。
哪条命令不想被记录就在在敲打的命令前加一个空格
有很多方法,我知道的比较方便的有
ln -s /dev/null ~/.bash_history
或者
$ unset HISTFILE
修改 /etc/profile 文件中的 HISTSIZE=1000 ,将1000改为0
if grep "unset HISTFILE" /etc/profile >/dev/null 2>&1 then find / -iname '*.bash_history' -type f -exec rm -f {} \; else echo "unset HISTFILE" >> /etc/profile find / -iname '*.bash_history' -type f -exec rm -f {} \; fi
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
哪条命令不想被记录就在在敲打的命令前加一个空格
有很多方法,我知道的比较方便的有
或者
修改 /etc/profile 文件中的 HISTSIZE=1000 ,将1000改为0