歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> 刪除Linux系統下history記錄的方法

刪除Linux系統下history記錄的方法

日期:2017/3/1 15:36:38   编辑:關於Linux
刪除Linux系統下history記錄的方法 Kindle提醒下大家,入侵時目標如果是linux服務器,看切忌清理痕跡的時候別忘記history命令的記錄哦   1、修改/etc/profile將HISTSIZE=1000改成0或1   清除用戶home路徑下。bash_history   2、立即清空裡的history當前歷史命令的記錄   history -c   3、bash執行命令時不是馬上把命令名稱寫入history文件的,而是存放在內部的buffer中,等bash退出時會一並寫入。   不過,可以調用'history -w'命令要求bash立即更新history文件。   history -w
Copyright © Linux教程網 All Rights Reserved