问题原文
原帖链接 · Nathan Arthur · CC BY-SA 3.0
I've noticed that crontab -e and sudo crontab -e seem to edit separate files. How do these two commands differ, and in what circumstances should each be used?
已采纳解答
原帖链接 · cduffin · CC BY-SA 3.0
crontab -e edits the crontab for the current user, so any commands contained within will be ran as the user who's crontab you are editing. sudo crontab -e will edit the root users crontab, and so the commands within will be run as root.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
