Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

zsh corrupt history file

#!/usr/bin/env zsh
# George Ornbo (shapeshed) http://shapeshed.com
# License - http://unlicense.org
#
# Fixes a corrupt .zsh_history file

mv ~/.zsh_history ~/.zsh_history_bad
strings ~/.zsh_history_bad > ~/.zsh_history
fc -R ~/.zsh_history
rm ~/.zsh_history_bad
Source by shapeshed.com #
 
PREVIOUS NEXT
Tagged: #zsh #corrupt #history #file
ADD COMMENT
Topic
Name
3+8 =