terminal - nice version of shutdown -h?

Associate
Joined
21 Oct 2008
Posts
1,679
Location
Mooching... in your house
does anyone know of a "nicer" terminal command than shutdown -h?

if i need to switch off a computer, usually a mac, remotely, i use sudo shutdown -h now...

however, this really does just switch off the computer there and then as opposed to nicely shutting off individual programs first like a normal local shutdown...

is there a different command for this? or maybe a modifier for the shutdown command? (although i can't see one in the man shutdown page)

any ideas?
 
I'm pretty sure
Code:
shutdown -h now
will power off the system in a safe and clean way - it's not the same as just pulling the plug.

From the man page:

SIGTERM TO SIGKILL INTERVAL
Upon shutdown, all running processes are sent a SIGTERM followed by a SIGKILL. The SIGKILL will follow the SIGTERM by an intentionally indeterminate period of time. Programs are expected to take only enough time to flush all dirty data and exit.
 
Last edited:
so if shutdown -h now which I have been using is in fact nice, why doesn't the system shut down this way as the norm? if i'm running say 10 apps shutting down takes quite a while the normal way, where as the terminal command just... does it, there and then.

what is the technical advantage to the way the system does it via the normal route, is it just simply nicer still?
 
Back
Top Bottom