1.at #延时任务
延时任务是暂时的
at 时间
[root@localhost ~]# at 21:15 #21:15执行(回车后开始计时)
at> rm -fr /mnt/file{1..3}
at> <EOT> # ctrl +d 发起动作
job 1 at Sat Apr 21 21:15:00 2018
[root@localhost ~]# at -l #显示有几个延时任务并显示他们的序号
1 Sat Apr 21 21:15:00 2018 a root
[root@localhost ~]# at -c 1 #查看延时任务1的详细内容
#!/bin/sh
${SHELL:-/bin/sh} << 'marcinDELIMITER03b19dfb'
rm -fr /mnt/file{1..3}
marcinDELIMITER03b19dfb
[root@localhost ~]# at -r 1 #删除延时任务1
at 命令的执行权力设定
黑名单
/etc/at.deny
[root@localhost ~]# vim /etc/at.deny
[root@localhost ~]# cat /etc/at.deny
westos
[root@localhost ~]# su - linux
Last login: Sat Apr 21 21:33:56 EDT 2018 on pts/1
[linux@localhost ~]$ at now+1min
at> <EOT>
job 7 at Sat Apr 21 21:37:00 2018
[linux@localhost ~]$ exit
logout
[root@localhost ~]# su - westos
Last login: Sat Apr 21 21:33:21 EDT 2018 on pts/1
[westos@localhost ~]$ at now+1min
You do not have permission to use at.
[westos@localhost ~]$ exit
logout
白名单
/etc/at.allow