[root@localhost ~]# crontab -e # 创建计划任务*****/bin/ls[root@localhost ~]# crontab -l # 查看计划任务*****/bin/ls[root@localhost ~]# ls /var/spool/cron/
root
[root@localhost ~]# cat /var/spool/cron/root # 都是写在这里呢*****/bin/ls[root@localhost ~]# tail /var/log/cron # 查看日志[root@localhost ~]# crontab -u egon -e# /etc/cron.deny 是定时任务的黑名单,使用root将需要拒绝的用户加入/etc/cron.deny[root@localhost ~]# echo "egon" >> /etc/cron.deny[root@localhost ~]# su - egon # 登陆该普通用户,无法编写定时任务
上一次登录:四 8月 13 19:44:10 CST 2020pts/1 上
[egon@localhost ~]$ crontab -e
You (egon) are not allowed to use this program (crontab)
See crontab(1)for more information