I am trying Ubuntu Server 10.10 in VirtualBox. I like that the commands I run is saved in a "history"-file that can be shown with the
history command. But if I just turn off VirtualBox without the
shutdown command, then next time when I boot, the commands from the last session is not saved in the history file.
The commands are only saved if I shutdown the machine with the
shutdown command. E.g.
shutdown -P 0.
Is there any way I can save the history file after every command so they are persistent even after a "non-clean" shutdown?