Read more

How to fix a corrupt (zsh) history file

Andreas Robecke
July 28, 2015Software engineer

When you the following error:

zsh: corrupt history file /home/marc/.zsh_history
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

You can try and fix your history file by extracting only the valid strings:

cd ~
mv .zsh_history .zsh_history_bad
strings .zsh_history_bad > .zsh_history

fc -R .zsh_history # reloads the history
Posted by Andreas Robecke to makandra dev (2015-07-28 08:57)