zoukankan      html  css  js  c++  java
  • 系统定时关机命令–shutdown

    一、Linux系统的shutdown

    1、立刻关机

    root#:shutdown -h now

    2、立刻重启

    root#:shutdown -r now

    3、定时关机

    3.1 一个小时后关机

    root#:shutdown -h +60 &

    3.2 在22:00关机

    root#:shutdown -h 22:00

    4、定时重启

    4.1 一个小时后重启

    root#:shutdown -r +60 &

    4.2 在22:00重启

    root#:shutdown -r 22:00

    5、取消定时关机

    root#:shutdown -c

    语法:shutdown [-efFhknr][-t 秒数][时间][警告信息]

    参  数:

     -c  当执行"shutdown -h 11:50"指令时,只要按+键就可以中断关机的指令。

     -f  重新启动时不执行fsck。

     -F  重新启动时执行fsck。

     -h  将系统关机。

     -k  只是送出信息给所有用户,但不会实际关机。

     -n  不调用init程序进行关机,而由shutdown自己进行。

     -r  shutdown之后重新启动。

     -t<秒数>  送出警告信息和删除信息之间要延迟多少秒。

     [时间]  设置多久时间后执行shutdown指令。

     [警告信息]  要传送给所有登入用户的信息。

    二、Windows系统的shutdown

    1、立刻关机

    shutdown -s -t 0

    2、立刻重启

    shutdown -r -t 0

    3、定时关机

    3.1 一个小时后关机

    shutdown –s –t 3600

    3.2 在22:00关机

    at 22:00 shutdown –s

    4、定时重启

    4.1 一个小时后重启

    shutdown –r –t 3600

    4.2 在22:00重启

    at 22:00 shutdown –r

    5、取消定时关机

    shutdown -c

    6、附ShutDown用法及参数

    用法: shutdown [-i | -l | -s | -r | -a] [-f] [-m computername] [-t xx] [-c 'comment'] [-d up:xx:yy]

    没有参数 显示此消息(与 ? 相同)

    -i 显示 GUI 界面,必须是第一个选项

    -l 注销(不能与选项 -m 一起使用)

    -s 关闭此计算机

    -r 关闭并重启动此计算机

    -a 放弃系统关机

    -m computername 远程计算机关机/重启动/放弃

    -t xx 设置关闭的超时为 xx 秒

    -c 'comment' 关闭注释(最大 127 个字符)

    -f 强制运行的应用程序关闭而没有警告

    -d [p]:xx:yy 关闭原因代码

    u 是用户代码

    p 是一个计划的关闭代码

    xx 是一个主要原因代码(小于 256 的正整数)

    yy 是一个次要原因代码(小于 65536 的正整数)

    -f:强行关闭应用程序

    -m 计算机名:控制远程计算机

    -i:显示图形用户界面,但必须是Shutdown的第一个选项

    -l:注销当前用户

    -r:关机并重启

    -t时间:设置关机倒计时

    -c '消息内容':输入关机对话框中的消息内容(不能超127个字符

  • 相关阅读:
    PS教程:合成复古人物风格海报的技巧
    配色那么差,还不‘哥屋恩’去看电影!
    中国最贵海报设计师!黄海究竟凭什么?
    这才叫会PS,普通照片分分钟P成好莱坞海报!
    安装ADOBE全系列软件的步骤
    UI设计教程:几步教你如何创建一个漂亮又好吃的饼干
    Design and Analysis of Algorithms_Brute Froce
    Design and Analysis of Algorithms_Fundamentals of the Analysis of Algorithm Efficiency
    Design and Analysis of Algorithms_Introduction
    从顺序查找窥探平均时间复杂度分析的一般化方法
  • 原文地址:https://www.cnblogs.com/sigmon/p/3686169.html
Copyright © 2011-2022 走看看