Today I almost lost 2 years of shell history. I don't know what happened, but only the first 54 thousand lines were kept and the rest of the shell history disappeared.

I learned two things:

1. Having backups is damn important
2. You set a file attribute to only allow appending! No more breakages and sudden corruptions of the history files!

chattr +a .zsh_history

#linux

@staticnoisexyz why would you want a shell history that huge?