Http://www.cnblogs.com/libook/p/3186534.html
A few nights ago, I couldn't sleep, so I wanted to use nexus7 to listen to the song of little wild Lisa and go to bed in a quiet and peaceful manner (how do I feel a little bit ...) However, the tablet cannot always play in this loop (Google Play Music in the room), so I opened terminal on the tablet and made a series of attempts. The shutdown command did not exist, the help of the reboot command also provides only a few poor parameters, So I Google sogou hundreds of times and read a lot of information to find a reboot usage, strange, why didn't I see this p parameter during reboot -- help? The following describes how to use the p parameter:
$ su# reboot -p
The p parameter of the reboot command
This test is available in my nexus7, it is really power off, and it is an instant shutdown, so I remember that the sleep command in Linux can Let terminal wait for a specified time, haha, the following statement can be constructed to shut down at a specific time:
$ su# sleep 10 && reboot -p
Test successful! This statement means that the super user permission is obtained first (the system needs to be root), and the shutdown command is executed 10 seconds later.
For the p Parameter of reboot, the help description in terminal is not provided for this p parameter. If we think of the close relation between reboot and halt, let's take a look at the helt parameter description:
# halt --helpusage: halt [-n] [-w] [-d] [-f] [-h] [-i] [-p] -n: don't sync before halting the system -w: only write a wtmp reboot record and exit. -d: don't write a wtmp record. -f: force halt/reboot, don't call shutdown. -h: put harddisks in standby mode. -i: shut down all network interfaces. -p: power down the system (if possible, otherwise halt).
Halt Command Parameters
Have you seen the last p parameter? The help description is: power down the system (if possible, otherwise halt ).
If the system can be shut down, the system will be shut down. If the system cannot be shut down, the execution of this command will be terminated.
Because it is second-off, do not know the impact on the system for the moment, here is a discussion.