如何干净彻底的清除Linux服务器操作命令记录。下面本站长为大家操作一下?
第一步:history -c //清空历史执行命令
第二步:echo > ./.bash_history //或清空用户目录下的这个文件即可
第三步:vi /root/history (这个过程是重新建立history文件,然后退出即可)
第四部:history -c //清除记录
第五部:history -r /root/history.txt //导入记录
第六部:history //查询导入结果
'); })();