Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
"shutdown -fh now" vs. the power button
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="witeshark" data-source="post: 48636" data-attributes="member: 3865"><p><span style="color: darkred">SHUTDOWN(8) BSD System Manager's Manual SHUTDOWN(8)</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">NAME</span></p><p><span style="color: darkred"> shutdown - close down the system at a given time</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">SYNOPSIS</span></p><p><span style="color: darkred"> shutdown [-] [-fhkrn] time [warning-message ...]</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">DESCRIPTION</span></p><p><span style="color: darkred"> Shutdown provides an automated shutdown procedure for super-users to</span></p><p><span style="color: darkred"> nicely notify users when the system is shutting down, saving them from</span></p><p><span style="color: darkred"> system administrators, hackers, and gurus, who would otherwise not bother</span></p><p><span style="color: darkred"> with such niceties.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> Available friendlinesses:</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -f Shutdown arranges, in the manner of fastboot(8), for the file sys-</span></p><p><span style="color: darkred"> tems not to be checked on reboot.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -h The system is halted at the specified time when shutdown execs</span></p><p><span style="color: darkred"> halt(8).</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -k Kick every body off. The -k option does not actually halt the sys-</span></p><p><span style="color: darkred">tem, but leaves the system multi-user with logins disabled (for all</span></p><p><span style="color: darkred"> but super-user).</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -n Prevent the normal sync(2) before stopping.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -r Shutdown execs reboot(8) at the specified time.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> time Time is the time at which shutdown will bring the system down and</span></p><p><span style="color: darkred"> may be the word now (indicating an immediate shutdown) or specify a</span></p><p><span style="color: darkred"> future time in one of two formats: +number, or yymmddhhmm, where</span></p><p><span style="color: darkred"> the year, month, and day may be defaulted to the current system</span></p><p><span style="color: darkred"> values. The first form brings the system down in number minutes</span></p><p><span style="color: darkred"> and the second at the absolute time specified.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> warning-message</span></p><p><span style="color: darkred"> Any other arguments comprise the warning message that is broadcast</span></p><p><span style="color: darkred"> to users currently logged into the system.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> - If `-' is supplied as an option, the warning message is read from</span></p><p><span style="color: darkred"> the standard input.</span></p><p><span style="color: darkred">At intervals, becoming more frequent as apocalypse approaches and start-</span></p><p><span style="color: darkred"> ing at ten hours before shutdown, warning messages are displayed on the</span></p><p><span style="color: darkred"> terminals of all users logged in. Five minutes before shutdown, or imme-</span></p><p><span style="color: darkred"> diately if shutdown is in less than 5 minutes, logins are disabled by</span></p><p><span style="color: darkred"> creating /etc/nologin and copying the warning message there. If this</span></p><p><span style="color: darkred"> file exists when a user attempts to log in, login(1) prints its contents</span></p><p><span style="color: darkred"> and exits. The file is removed just before shutdown exits.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> At shutdown time a message is written in the system log, containing the</span></p><p><span style="color: darkred"> time of shutdown, who initiated the shutdown and the reason. A terminate</span></p><p><span style="color: darkred"> signal is then sent to init to bring the system down to single-user state</span></p><p><span style="color: darkred"> (depending on above options). The time of the shutdown and the warning</span></p><p><span style="color: darkred"> message are placed in /etc/nologin and should be used to inform the users</span></p><p><span style="color: darkred"> about when the system will be back up and why it is going down (or any-</span></p><p><span style="color: darkred"> thing else).</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">FILES</span></p><p><span style="color: darkred"> /etc/nologin tells login not to let anyone log in</span></p><p><span style="color: darkred"> /fastboot tells rc(8) not to run fsck when rebooting</span> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="witeshark, post: 48636, member: 3865"] [color=darkred]SHUTDOWN(8) BSD System Manager's Manual SHUTDOWN(8) NAME shutdown - close down the system at a given time SYNOPSIS shutdown [-] [-fhkrn] time [warning-message ...] DESCRIPTION Shutdown provides an automated shutdown procedure for super-users to nicely notify users when the system is shutting down, saving them from system administrators, hackers, and gurus, who would otherwise not bother with such niceties. Available friendlinesses: -f Shutdown arranges, in the manner of fastboot(8), for the file sys- tems not to be checked on reboot. -h The system is halted at the specified time when shutdown execs halt(8). -k Kick every body off. The -k option does not actually halt the sys- tem, but leaves the system multi-user with logins disabled (for all but super-user). -n Prevent the normal sync(2) before stopping. -r Shutdown execs reboot(8) at the specified time. time Time is the time at which shutdown will bring the system down and may be the word now (indicating an immediate shutdown) or specify a future time in one of two formats: +number, or yymmddhhmm, where the year, month, and day may be defaulted to the current system values. The first form brings the system down in number minutes and the second at the absolute time specified. warning-message Any other arguments comprise the warning message that is broadcast to users currently logged into the system. - If `-' is supplied as an option, the warning message is read from the standard input. At intervals, becoming more frequent as apocalypse approaches and start- ing at ten hours before shutdown, warning messages are displayed on the terminals of all users logged in. Five minutes before shutdown, or imme- diately if shutdown is in less than 5 minutes, logins are disabled by creating /etc/nologin and copying the warning message there. If this file exists when a user attempts to log in, login(1) prints its contents and exits. The file is removed just before shutdown exits. At shutdown time a message is written in the system log, containing the time of shutdown, who initiated the shutdown and the reason. A terminate signal is then sent to init to bring the system down to single-user state (depending on above options). The time of the shutdown and the warning message are placed in /etc/nologin and should be used to inform the users about when the system will be back up and why it is going down (or any- thing else). FILES /etc/nologin tells login not to let anyone log in /fastboot tells rc(8) not to run fsck when rebooting[/color] :) [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
"shutdown -fh now" vs. the power button
Top