Hacker News new | ask | show | jobs
by avaron 2126 days ago
Ha! this is specific to Solaris in the old days where a reboot command can in cases, corrupts the OS. This has long been fixed but personally use sync;sync;halt for Solaris as a matter of habit. It even spills over to Linux on my part because of kernel upgrades and just because of muscle memory, plus it's a good idea to run sync anyways. Now i feel old! :)
2 comments

I recently saw a comment that the advice `sync;sync;halt` is actually wrong and the correct one was:

   sync
   sync
   halt
typed out manually, to give enough time for the first sync.

https://lwn.net/Articles/843269/

Should be:

    $ sync && sync && sync && halt
BTW, the 'sync;sync;sync' thing was a necessary command given, mosty during the late 70's and early 80's, to park the tape head. Unix didn't have a 'rewind tape' command, so many manufacturers instead decided that three rapid syncs in a row meant 'rewind tape'.

Disclaimer: had that muscle memory burned into me for decades, I still do it ...

To be perfectly honest, I inserted the semicolons because I wanted it to make at least a little sense... I wasn't paying close enough attention to the old-timer reminiscing to recall his precise keystrokes. But thanks for the link!
I've been doing this so long that it's sometimes what I type on the terminal when I'm just thinking about something else completely, planning my next piece of work or whatever. Like an idle or holding pattern.