Toxic Elephant

crontab -r

Posted by matijs Tue, 20 Mar 2007 18:27:00 GMT

I don’t use the crontab command on my own machines (I just put files in /etc/cron*), but recent experience on another machine made me wonder why crontab has the following options (this is from crontab --help):

-e      (edit user's crontab)
-l      (list user's crontab)
-r      (delete user's crontab)

Right. E is for edit, L is for list, R is for delete. Makes sense. And as a bonus, it is easier to accidentally delete your crontab when you want to edit it.

Brilliant.

Posted in  | Tags  | 2 comments | no trackbacks

Comments

  1. Jurjen said 1 day later:

    It’s the help text that is deceiving, I think it should be:

    “-r (remove user’s crontab)”

    Besides that I fail to see a problem, other than you ignoring the case sensitivity of the OS commands in your comment :-) That is, unless you whished to do something recursively with your crontab and thus deleting it.

  2. Matijs said 4 days later:

    @Jurjen: Well, I cheated a little of course, because the man page does say remove. Call it poetic license. I’m mainly stunned that the most-used option and the most destructive option are one fat-fingered typo away from each other. -d would have already been better, but when a program has only three options, why not use, e.g., -e, -l and -x?

No trackbacks

Comments are disabled

Toxic Elephant is Matijs van Zuijlen's weblog.

Powered

Categories

Archives