Red Hat Bugzilla – Bug 35985
"crontab -r" behavior
Last modified: 2008-03-13 15:18:51 EDT
The "-r" option of "crontab" command is USELESS and often HARMFUL.
(It's easy to mistype "-e" as "-r"!)
disable "-r" option
change to make backup file.
The R key is next to the E key.
At least there should be a confirmation prior to delete your crontab.
A crontab is a really usefull config, and is likelly that you will never
will want to delete a crontab file.
Please disable the -r option.
*** Bug 54119 has been marked as a duplicate of this bug. ***
Please don't remove "crontab -r". It's a standard crontab option, and it makes
programmatic manipulation of crontab files a lot easier. My site depends on it
for some scripts which do automatic error-handling for our automated jobs.
I think a good solution would be to add an -i option, like cp and mv have.
Then, people wanting the new feature will only need to add:
alias crontab="crontab -i"
to the their /etc/bashrc file
This is now fixed in vixie-cron-4.1-8 .
There is now a '-i' modifier of the '-r' crontab delete
option that will prompt for Y/y before actually deleting
the crontab, similar to 'cp -i' / 'mv -i'.