Simple question: what params can be used to shutdown a computer running Linux/OSX in 30 seconds? I've always run Windows, where I would go shutdown -s -t 30 but the parameters are different. I've looked it up here but it will only let you shut a computer down at a specific time (like 8:00) rather than in a specific amount of seconds.
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
|
|||
|
|
migrated from stackoverflow.com May 12 '11 at 22:56
|
In OS X you can shutdown in one minute using the following command:
AFAIK, it's not possible to specify seconds instead of minutes with this command. You can also reboot by using EDIT: As you mentioned in your comment, you can add a delay programmatically, then shut down the system immediately with
But note that that command will require root access. |
|||||||||
|
|
As pointed out, the command
Adds one minute. If you wanted to do it in seconds or hours or something very specific you could do something like:
|
|||
|
|
|
Using the basic calls, I don't see a way to do it with seconds, but it looks like you can do it with minutes:
In other words:
If you want to shut it down in 1 minute. |
|||||||
|
|
Have you tried: |
|||||||
|