当前位置: 技术问答>linux和unix
ssh的root登录在history -w之后~/.bash_history删除相关行为什么重新登录历史命令还在?
来源: 互联网 发布时间:2017-03-01
本文导语: 包括删除的以前登录的命令记录也没删掉,这是为什么?如果是有备份,怎么看备份在哪里? | history -c 清除历史记录 history -r /root/history.txt,把命令读进来作为当前bash的历史记录 history -w...
包括删除的以前登录的命令记录也没删掉,这是为什么?如果是有备份,怎么看备份在哪里?
|
history -c 清除历史记录
history -r /root/history.txt,把命令读进来作为当前bash的历史记录
history -w /root/history.txt,把当前bash的历史记录写入history.txt
history -r /root/history.txt,把命令读进来作为当前bash的历史记录
history -w /root/history.txt,把当前bash的历史记录写入history.txt