This question already has an answer here:
IIANM, bash saves its history to
~/.bash_history (or to
$HISTFILE) on exit from a login shell session. But - what if you want to occasionally persist it for fear of the shell getting prematurely killed (as in SIGKILL or power failure)? Is this possible without burdening the system or the shell session experience?