清空history记录
7 年 ago jony 清空history记录已关闭评论
1、当前session执行的命令,放置缓存中,执行exit时,把缓存信息写入~/.bash_history
2、当session直接被kill时,缓存中的历史命令不会写入~/.bash_history
3、正确清空当前用户的history的方法
| 1234 | >~/.bash_historyhistory -c #清空当前缓存中的命令exit #关闭shell连接,可以避免写入~/.bash_history#执行exit,会把该命令记录到~/.bash_history文件去 |