LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 950|回复: 8

shutdown 选项,为什么执行没反应?

[复制链接]
发表于 2006-8-15 21:48:19 | 显示全部楼层 |阅读模式
root@localhost ~]# shutdown -t 20
Usage:    shutdown [-akrhfnc] [-t secs] time [warning message]
                  -a:      use /etc/shutdown.allow
                  -k:      don't really shutdown, only warn.
                  -r:      reboot after shutdown.
                  -h:      halt after shutdown.
                  -f:      do a 'fast' reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through "init" but go down real fast.
                  -c:      cancel a running shutdown.
                  -t secs: delay between warning and kill signal.
                  ** the "time" argument is mandatory! (try "now") **




为什么会这样呢?
发表于 2006-8-15 21:56:19 | 显示全部楼层
root@localhost ~]# shutdown -t 20
Usage:    shutdown [-akrhfnc] [-t secs] [color="Red"]time [warning message]
               ....................
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-15 22:30:09 | 显示全部楼层
不是很明白,能否说清楚一点.
若想20 秒后关机,要怎么用这个命令.
回复 支持 反对

使用道具 举报

发表于 2006-8-15 22:40:40 | 显示全部楼层
shutdown -h -t 20
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-15 22:45:39 | 显示全部楼层
[root@localhost ~]# shutdown -h -t 20
Usage:    shutdown [-akrhfnc] [-t secs] time [warning message]
                  -a:      use /etc/shutdown.allow
                  -k:      don't really shutdown, only warn.
                  -r:      reboot after shutdown.
                  -h:      halt after shutdown.
                  -f:      do a 'fast' reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through "init" but go down real fast.
                  -c:      cancel a running shutdown.
                  -t secs: delay between warning and kill signal.
                  ** the "time" argument is mandatory! (try "now") **
[root@localhost ~]#
[root@localhost ~]#

谢谢回复,怎么我照楼上写的,怎么还是上面的提示呢?
回复 支持 反对

使用道具 举报

发表于 2006-8-16 00:34:15 | 显示全部楼层
shutdown -h 20
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-16 06:58:37 | 显示全部楼层
楼上的写的是20分钟后关机的命令,不是20秒后关机的命令啊.

20秒关机怎么写呢
-t 参数和time 倒底怎么用的呢,请大家指点一下啊,谢谢.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-16 20:41:30 | 显示全部楼层
shutdown -t 20 0

time是必要的选项.
回复 支持 反对

使用道具 举报

发表于 2006-8-17 18:52:31 | 显示全部楼层
sleep 1200; init 0
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表