1834872 Members
2526 Online
110070 Solutions
New Discussion

Re: Shutdown Command

 
SOLVED
Go to solution
AL_3001
Regular Advisor

Shutdown Command

Hi Friends,
I have to issue a shutdown command with a message 15 minutes prior to the shutdown.
shutdown -r -y 900 (i am assuming 900 seconds)

Kindly correct if i am wrong?

Thanks.
5 REPLIES 5
Geoff Wild
Honored Contributor
Solution

Re: Shutdown Command

That is the correct way and yes 990 is seconds...

With the -y - you won't be prompted to give your own message....

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Pete Randall
Outstanding Contributor

Re: Shutdown Command

Yes, that's correct if you want the machine to shutdown and then reboot. If you just want it to shut down, then use the -h option instead of -r.


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: Shutdown Command

This is the kind of question that should never be asked. A simple "man 1m shutdown" would answer your question for a specific OS version and would be more trustworthy than listening to a bunch of people on the Internet. If you have to ask how to do a routine shutdown then you are probably not the person who should be doing it because the grace period is probably the least significant criterion. Of far more import is "Is it safe to shutdown now?" or "Do all of my applications have graceful rc shutdown scripts?".
If it ain't broke, I can fix that.
AL_3001
Regular Advisor

Re: Shutdown Command

Thanks.
Dennis Handly
Acclaimed Contributor

Re: Shutdown Command

If you want to document that you are waiting 15 minutes you can use:
# shutdown -r -y $(( 15*60 ))