Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Any way to force OSX to shut down?

Any way to force OSX to shut down?
Thread Tools
peeb
Addicted to MacNN
Join Date: Mar 2006
Status: Offline
Reply With Quote
Mar 28, 2008, 02:52 AM
 
I'm so fed up with having to babysit OSX shutting down. I've saved all my documents, but each app wants to have an in-depth discussion about whether I really want to shut down. By the time it has, the shut down has timed out. Sometimes this happens TWICE!
I want the equivalent of Option Empty trash for when I REALLY KNOW that I want to shut down and force quit any open apps. Anything?
Thanks!
     
red rocket
Mac Elite
Join Date: Mar 2002
Status: Offline
Reply With Quote
Mar 28, 2008, 06:56 AM
 
Type this into a Terminal window:

[codex]
sudo shutdown - h now
[/codex]

After entering your admin password, the system will shut down within a few seconds, killing any open apps in the process.
     
MacosNerd
Professional Poster
Join Date: Jun 2007
Status: Offline
Reply With Quote
Mar 28, 2008, 08:06 AM
 
I generally close all my apps and save my files before I shut the machine down. I think that's probably the safest approach.

If you want to bring it down fast, you can always hold the power button down for a few seconds and that will shut the computer off.
     
ibook_steve
Moderator
Join Date: Oct 2001
Location: San Jose, CA
Status: Offline
Reply With Quote
Mar 28, 2008, 01:23 PM
 
Originally Posted by MacosNerd View Post
If you want to bring it down fast, you can always hold the power button down for a few seconds and that will shut the computer off.
That's equivalent to pulling the plug. You do NOT want to do this unless the machine is frozen. This could cause file or OS damage that needs to be repaired on the next boot. In other words, don't do it!

Steve
Celebrating 10 years and 4000 posts on MacNN!
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Mar 28, 2008, 01:29 PM
 
Originally Posted by red rocket View Post
Type this into a Terminal window:

[codex]
sudo shutdown - h now
[/codex]

After entering your admin password, the system will shut down within a few seconds, killing any open apps in the process.
1) NO space between - and h. It's gotta be "-h"

2) I really don't now what the -h flag does.
According to the man page, "The system is halted at the specified time." The specified time is now, but I don't know what "halted" means and does. Is that the equivalent of shutting down w/o reboot ?

-t
     
Big Mac
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Mar 28, 2008, 01:41 PM
 
-h species the time and now specifies now.

You could kill your login window, peeb, and that would cause your user to exit to the Login pane immediately. But it's really not a very nice thing to do to your system.

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Mar 28, 2008, 02:12 PM
 
Originally Posted by Big Mac View Post
-h species the time and now specifies now.
This is not true. Read the MAN page.
"NOW" specifies the time, "-h" specifies the MODE of shutdown.

I'm not familiar with the mode "-h" = HALT. I only used ="-r" = REBOOT in the past.

-t
     
Big Mac
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Mar 28, 2008, 02:39 PM
 
Oh I thought h was for hour. I'll have to reread my main page when I get out of the office and back on a Mac.

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Mar 28, 2008, 02:59 PM
 
Originally Posted by turtle777 View Post
1) NO space between - and h. It's gotta be "-h"

2) I really don't now what the -h flag does.
According to the man page, "The system is halted at the specified time." The specified time is now, but I don't know what "halted" means and does. Is that the equivalent of shutting down w/o reboot ?
According to the manpage, halt flushes the file system cache to disk, sends SIGTERM followed by SIGKILL to all processes and powers down the system.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
MacosNerd
Professional Poster
Join Date: Jun 2007
Status: Offline
Reply With Quote
Mar 28, 2008, 03:02 PM
 
Originally Posted by ibook_steve View Post
That's equivalent to pulling the plug.
Oh I know. My point is if the OP was looking to bring down the system quick, that is the quickest method.

As I said, I close all apps, save my files and then shut down - that's the safest, anything else could cause loss of data or corruption.
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Mar 28, 2008, 03:03 PM
 
Originally Posted by Chuckit View Post
According to the manpage, halt flushes the file system cache to disk, sends SIGTERM followed by SIGKILL to all processes and powers down the system.
Hm, what man pages are you looking at ? The one I linked above didn't have those details listed.

So, summarizing, -h that would be equivalent of "turning off".

-t
     
Tomchu
Mac Elite
Join Date: Sep 2005
Status: Offline
Reply With Quote
Mar 28, 2008, 03:05 PM
 
The "-h" option sends a power-down command to the system's power management hardware so that power is cut off -- after all of the shut down procedures and disk flushing have finished.

The "-r" simply sends a restart command.

The "-h" option is the equivalent of "-p" on FreeBSD (for "power off"). The "-h" option in FreeBSD simply halts the OS after the shutdown procedures, but doesn't power off the system.
     
peeb  (op)
Addicted to MacNN
Join Date: Mar 2006
Status: Offline
Reply With Quote
Mar 28, 2008, 03:33 PM
 
Originally Posted by MacosNerd View Post
Oh I know. My point is if the OP was looking to bring down the system quick, that is the quickest method.

As I said, I close all apps, save my files and then shut down - that's the safest, anything else could cause loss of data or corruption.
I want to shut it down properly, not just speedily, but I've saved all my docs - I just want to avoid a long discussion with each app about whether I really want to quit.
     
Big Mac
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Mar 28, 2008, 03:50 PM
 
If you've saved everything they shouldn't be prompting you, right? Other than Safari's tab warnings (which are usually important), I don't have a problem with this issue.

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
peeb  (op)
Addicted to MacNN
Join Date: Mar 2006
Status: Offline
Reply With Quote
Mar 28, 2008, 04:23 PM
 
A lot of programs do ask you. Pages and Word, for example. Mail very rarely shuts down gracefully, instead it hangs more often than not. Safari's tab warnings are important if you don't know whether you want to close them all, but since I have forget me not installed (previously open tabs re-open) I don't care. I just want an option not to engage in prolonged debate with all the apps if I am already sure I just want to close everything without saving.
     
EndlessMac
Senior User
Join Date: Dec 2005
Status: Offline
Reply With Quote
Mar 28, 2008, 05:37 PM
 
Originally Posted by peeb View Post
A lot of programs do ask you.
My programs are pretty much the opposite of yours because they don't ask. If I have already saved my files then I can just quickly press command Q and quit the program without it asking me to do anything. Just about all my programs are like that so I was surprised to hear about your problem. Some programs you have to turn off the exit messages in the preference menus so try that if you haven't already.

Basically if I have to shut down quickly I just command Q everything and then use the short cut for shutting down and I'm done. It usually only takes me about a minute to do so.
     
peeb  (op)
Addicted to MacNN
Join Date: Mar 2006
Status: Offline
Reply With Quote
Mar 28, 2008, 05:46 PM
 
Hmmm.. I'll have to check the prefs. Thanks.
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Mar 29, 2008, 11:54 AM
 
Originally Posted by turtle777 View Post
Hm, what man pages are you looking at ? The one I linked above didn't have those details listed.
That was from the manpage for halt.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
msuper69
Professional Poster
Join Date: Jan 2000
Location: Columbus, OH
Status: Offline
Reply With Quote
Mar 29, 2008, 05:58 PM
 
Originally Posted by peeb View Post
... Safari's tab warnings are important if you don't know whether you want to close them all, but since I have forget me not installed (previously open tabs re-open) I don't care....
The current version of Safari already has that in the History menu selection: Reopen All Windows From Last Session.
     
TETENAL
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
Mar 29, 2008, 06:22 PM
 
Originally Posted by peeb View Post
A lot of programs do ask you. Pages and Word, for example. Mail very rarely shuts down gracefully, instead it hangs more often than not.
In Pages change the "General" preferences for "New document" from "Template Chooser" to "Use Template: Empty" (or whatever template you use the most). If the template chooser is not open, Pages quits normally. You can still open the template chooser from the File menu in the rare case you do need to create a document from another template.
Mail always closed gracefully for me.

With regard to quickly shutting down: don't. Just use sleep. That's instant.
     
DCJ001
Dedicated MacNNer
Join Date: Oct 2007
Status: Offline
Reply With Quote
Mar 31, 2008, 03:38 PM
 
Originally Posted by EndlessMac View Post
My programs are pretty much the opposite of yours because they don't ask. If I have already saved my files then I can just quickly press command Q and quit the program without it asking me to do anything. Just about all my programs are like that so I was surprised to hear about your problem. Some programs you have to turn off the exit messages in the preference menus so try that if you haven't already.

Basically if I have to shut down quickly I just command Q everything and then use the short cut for shutting down and I'm done. It usually only takes me about a minute to do so.
"Command Q'ing everything" is unnecessary. When I want to shut down or restart or put my Mac to sleep, and I have no files to save, I press "Control-Eject" on my keyboard and I then press "Enter" to shut down, or I select "Restart" or "Sleep" when I see the prompts shown below:


When applications are open when I shut down or restart, they automatically quit in an efficient manner.
( Last edited by DCJ001; Mar 31, 2008 at 05:41 PM. )
     
ibook_steve
Moderator
Join Date: Oct 2001
Location: San Jose, CA
Status: Offline
Reply With Quote
Mar 31, 2008, 06:13 PM
 
Originally Posted by DCJ001 View Post
When applications are open when I shut down or restart, they automatically quit in an efficient manner.
If all files are saved, if there's only one browser tab, if Mail or Entourage is not currently checking mail, etc....

Steve
Celebrating 10 years and 4000 posts on MacNN!
     
DCJ001
Dedicated MacNNer
Join Date: Oct 2007
Status: Offline
Reply With Quote
Mar 31, 2008, 06:51 PM
 
Originally Posted by ibook_steve View Post
If all files are saved, if there's only one browser tab, if Mail or Entourage is not currently checking mail, etc....

Steve
If there are 15 Safari browser tabs (I've turned off the "closing multiple tabs" warning), along with a dozen other applications including, but not limited to, Mail, Photoshop, Office, iWork, etc., pressing "Control-Eject" on my keyboard and choosing the appropriate selection seems to be the most efficient and effective way to get the job done.

I see no need for me to use the "closing multiple tabs" warning. If I quit Safari, and I realize that I need to revisit those tabbed pages, I can use the "Reopen All Windows From Last Session" option under "History."
( Last edited by DCJ001; Mar 31, 2008 at 07:06 PM. )
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:36 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,