时间与时区的修改 延时任务 | timedatectl at | init
1,
timedatectl 查看时间
Local time: Sun 2018-11-11 11:13:49 CST ##CST是指上海时区Universal time: Sun 2018-11-11 03:13:49 UTC##这个也是bois系统所用的时间
RTC time: Sun 2018-11-11 03:14:01
Timezone: Asia/Shanghai (CST, +0800)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
2,
timedatectl list-timezones 列出时区
3,
timedatectl set-timezone Asia/Shanghai 设置时区
4,
timedatectl set-local-rtc 0 ###使用UTC时间##也可以vim /etc/adjtime直接改
###0.0 0 0.0##0
###UTC
5,
timedatectl set-local-rtc 1 ###使用LOCAL本地时间##也可以vim /etc/adjtime直接改
###0.0 0 0.0##0
###LOCAL
6,
timedatectl set-time "2018-11-11 11:11:11"##这种方法是更改本地时间
7,
任务延时
at 时间 ###在该时间作什么任务###
[[email protected] mnt]# at 16:30
at> touch /mnt/file{1..5} #########ctrl+d发起任务
at> <EOT>
job 1 at Sat Apr 14 16:30:00 2018
at now+5min ###5分钟之后作什么任务
[[email protected] mnt]# at 16:30
at> touch /mnt/file{1..5}
at> <EOT>
job 1 at Sat Apr 14 16:30:00 2018
at -l ##查看当前有什么任务
5 Sat Apr 14 17:00:00 2018 a root
at -c 5 ##查看任务号为5的具体任务是什么,倒数第二行
at -r 5 ##删除任务号为5的任务
8,时间任务的黑白名单
白名单 ###白名单一旦出现,黑名单失效
vim /etc/at.allow ##直接添加用户名,只有该名单和root用户可以使用at命令,文件需要建立
黑名单
vim /etc/at.deny ##直接添加用户名,该名单里面用户不能使用at命令,文件不需要建立,本身存在
#################################################################################
执行 init 3 由图形化界面进入纯文字界面
init 5 由文字界面进入纯文字界面
开机进入无图像界面ctrl+alt+f6(导航菜单上面send key里面有)
###接下来进入图形化的开机界面
#########################################################################