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 //查詢導入結果


分享到:


相關文章: