首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

ssh的root登录在history -w以后~/.bash_history删除相关行为什么重新登录历史命令还在

2012-09-25 
ssh的root登录在history -w之后~/.bash_history删除相关行为什么重新登录历史命令还在?包括删除的以前登录

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

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

热点排行