33 ms·
The history will not be written if either the shell/OS crashes, or if you `unset HIST_FILE` before exiting the shell.
by gurjeet 5y ago
The history will not be written if either the shell/OS crashes, or if you `unset HIST_FILE` before exiting the shell.
- hddqsb 5y agoYou have a typo: it should be `HISTFILE`, not `HIST_FILE`.
- don-code 5y ago> or if you `unset HIST_FILE` I figured I'd learn something by putting in the "I'd love to know others" bit, but this is something I didn't know I could do, and is genuinely useful to know!
- deleted 5y ago[deleted]
- amenghra 5y agoAlso, in most common cases, won’t be written to history file if the command is prefixed with a space (see HISTCONTROL).