Is Sudo Shutdown Clean?

This is probably a no brainer, but I have not found the answer in the archives or in Google. I see many references to using sudo shudown -h in the case of a problem, but I want to know if it is "safe" to use it on a regular basis. Will it cleanly shut down all the running processes before it closes down the machine?
Here's some background. I manage a small network with a B&W G3 running Panther as the file server. We are running a clean install with nothing extra in the startup items, so only the default processes should be running.
I don't want to leave the machine running all night because it makes too much noise and because it uses more power than I want to waste. (I've already taken care of cron; it runs at dinner time when everyone is away from their computers.) Additionally, perhaps leftover from previous operating systems, I feel that restarting the machine occasionally is good.
I don't want to have to go over to the machine, turn on the monitor, and choose shutdown from the GUI at the end of the day. Logging in remotely and issuing sudo shutdown -h +1:00 leaves me enough time to log out and seems to shut down the machine quite nicely. I've tried it a few times without any problems. However, I don't know if I'm developing some sort of subtle corruption by doing this.

Thanks

Posted on Jul 31, 2005 8:23 AM

Reply
4 replies

Aug 16, 2005 9:39 AM in response to Sam Watterson

Thanks for your thoughts, but I don't think I communicated correctly. I'm concerned about a comparison between the Unix shutdown command and the Finder Shut Down menu choice. As I understand it, the Unix command does not give applications a chance to gracefully exit or cancel the shutdown process. This is not an issue for me because the script I have created explicitly tells the only application that should be running to quit. I'm also not concerned about users being connected to the server because my script is specifically designed to only shut the machine down after all users have logged out. Are there other problems with using the Unix command to turn the machine off? For example, does the Finder have the chance it needs to close down or clean up any files it needs to be for the shut down?

Aug 24, 2005 8:58 AM in response to Steve Krawcke

Great. Thanks for the confirmation. I had gathered that this was the case from my searches and my experience, but I had not found anyone saying explicitly that shutdown should not cause any problems in this specific circumstance. I had only seen vague warnings about it. I've had the script up and running for a few weeks now and it does not seem to have caused any problems. I'll try to report back if I do find any problems.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Is Sudo Shutdown Clean?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.