问题:

报下面错误

zsh: corrupt history file /home/XXX/.zsh_history
  • 1

问题说明:

zsh是一个相当好用的shell,相信使用linux系统的朋友都不陌生,当然还有my zsh,不过有的时候会出现一些问题,例如因为有的时候系统因为默写原因强行启动的时候会破坏zsh的历史文件,导致下次使用的时候提示:zsh: corrupt history file /home/xxx/.zsh_history错误。

我们有一种暴力的解决方式,那就是删除,但是这样的话,我们以前的很多的历史命令就会没有,非常的麻烦。

解决方法:

cp .zsh_history zsh_history
rm -f .zsh_history 
strings zsh_history .zsh_history
#OK了,修复成功。


出自https://blog.csdn.net/qq_28426351/article/details/51750347

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-09-01
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2021-08-17
  • 2021-05-14
  • 2022-01-28
  • 2022-12-23
相关资源
相似解决方案