Date: Wed, 26 Aug 2009 17:24:37 +0400 From: Kamigishi Rei <spambox@haruhiism.net> To: barbara <barbara.xxx1975@libero.it> Cc: freebsd-current <freebsd-current@freebsd.org>, noc <noc@hdk5.net> Subject: Re: Root history not saving over reboot 8* Message-ID: <4A953795.9010709@haruhiism.net> In-Reply-To: <KOZJJ4$A25639717DA6466815236F4C7FE5703F@libero.it> References: <KOZJJ4$A25639717DA6466815236F4C7FE5703F@libero.it>
next in thread | previous in thread | raw e-mail | index | archive | help
barbara wrote: > I didn't tried pressing ctrl-d, but I can confirm that the history get lost even using shutdown as I use reboot only sometime in single user. > > BTW, isn't ctrl-d the combination for command completion? > I think I mentioned ctrl-d explicitly just because it is *essential* to press it. Ctrl-D performs a clean exit, given that the command line is empty. If one issues "shutdown -r now", the shell is not terminated, as the shutdown command starts the shutdown process in the background - because "now" is not the only option and it basically schedules the shutdown to happen in 0 minutes. After issuing "shutdown -r now" the user is returned to the shell, which remains active until it is killed during the shutdown process. Hitting Ctrl-D immediately after issuing that command ensures that you have "exit"-ed the shell; if that was done before the shutdown kill sequence, and before the filesystems are remounted read-only - that's exactly why I said "immediately" - the shell *will* save the history file. Using "reboot" or hitting Ctrl-Alt-Del on the console terminates all virtual consoles; if a console is terminated, the shell that was running on it exits on "Lost terminal" signal. I do indeed hope that this time my explanation is detailed enough. -- Kamigishi Rei KREI-RIPE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A953795.9010709>