How to fix corrupt history file .zsh_history?
Asked by Sohail · · 2189 views
On open terminal, I am getting this error:
zsh: corrupt history file /home/harish/.zsh_history
This is not allowing search back through the history with
CTRL+R and editing previous commands with
fc. How can I fix this error?
Run the following commands to fix the error and recover history to a new file:
cd ~ mv .zsh_history .zsh_history_old strings .zsh_history_old > .zsh_history fc -R .zsh_history
Please login or create new account to participate in this conversation.