使用 crontab -u <user> -l 未显示 Cronjobs

Uel*_*ter 1 cron

我直接添加了一些工作到

/etc/crontab
Run Code Online (Sandbox Code Playgroud)

文件。他们运行良好。但是,如果我使用 ???????? 我看不到它们。crontab??命令

crontab -u <user> -l
Run Code Online (Sandbox Code Playgroud)

我是否必须以某种方式重新索引文件,或者这可能是由格式错误引起的?

Flo*_*sch 5

用户 crontab 存储在/var/spool/cron/crontabs/. 您不能使用该crontab命令查看或编辑系统 crontab /etc/crontab

请注意,只有系统 crontab 包含日期后的用户字段。用户 crotab 条目始终运行相应的用户,因此他们不需要用户字段。