天天看点

如何查看其他用户的 cron 任务?

查看某个用户的 cron 任务:

crontab -u username -l
           

下面的脚本则列出所有用户的 cron 任务:

for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done