CentOS清除历史命令

CentOS清除历史命令

CentOS清除历史命令

清除历史执行命令

[root@localhost root]# history -c //清空历史执行命令

[root@localhost root]# echo > ./.bash_history //或清空用户目录下的这个文件即可

导入空历史记录

[root@localhost root]# vi /root/history //新建记录文件

[root@localhost root]# history -c //清除记录

[root@localhost root]# history -r /root/history.txt //导入记录

[root@localhost root]# history //查询导入结果


分享到:


相關文章: