sat*_*ish 10 bash redhat-enterprise-linux
我已经使用#history -c 清除了终端中的所有历史记录。现在我想恢复我所有被清除的命令。请给我一个答复
Dav*_*ill 11
history -c
将~/.bash_history
在该外壳中清除。
bash
不会立即将历史记录刷新到~/.bash_history
.
~/.bash_history
直到您使用history -w
.
如果你真的想清除你需要history -cw
在所有打开的 shell 中使用的历史记录。
history -w
您可以使用 重新加载历史记录history -r
。
如果您注销并再次登录,您的历史记录也将被恢复。
history -w
在一个 shell 中使用并且您打开了其他 shellhistory -w
(尽管它与另一个 shell 的历史记录不同)history -c
andhistory -w
归档时间: |
|
查看次数: |
22615 次 |
最近记录: |