日期:2014-05-16  浏览次数:20655 次

ssh的root登录在history -w之后~/.bash_history删除相关行为什么重新登录历史命令还在?
包括删除的以前登录的命令记录也没删掉,这是为什么?如果是有备份,怎么看备份在哪里?

------解决方案--------------------
history -c 清除历史记录
history -r /root/history.txt,把命令读进来作为当前bash的历史记录
history -w /root/history.txt,把当前bash的历史记录写入history.txt