Bug 35985 - "crontab -r" behavior
Summary: "crontab -r" behavior
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: vixie-cron
Version: 6.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact: David Lawrence
: 54119 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2001-04-16 01:19 UTC by Red Hat Bugzilla
Modified: 2008-03-13 19:18 UTC (History)
1 user (show)

Fixed In Version: vixie-cron-4.1-8
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2004-08-10 21:55:30 UTC

Attachments (Terms of Use)

Description Red Hat Bugzilla 2001-04-16 01:19:38 UTC
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.

Comment 1 Red Hat Bugzilla 2001-09-27 18:02:44 UTC
I agree.
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.


Comment 2 Red Hat Bugzilla 2002-08-14 10:40:34 UTC
*** Bug 54119 has been marked as a duplicate of this bug. ***

Comment 3 Red Hat Bugzilla 2002-12-10 23:17:22 UTC
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.

Comment 4 Red Hat Bugzilla 2002-12-10 23:51:18 UTC
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

Comment 5 Red Hat Bugzilla 2004-08-10 21:55:30 UTC
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'.

Note You need to log in before you can comment on or make changes to this bug.