Bug 54119
| Summary: | 'crontab -r' is very harmfull | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Oliver Schulze L. <oliver> |
| Component: | vixie-cron | Assignee: | Jens Petersen <petersen> |
| Status: | CLOSED DUPLICATE | QA Contact: | Brock Organ <borgan> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.1 | Keywords: | FutureFeature |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2002-08-14 10:01:11 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Oliver Schulze L.
2001-09-27 18:17:43 UTC
Another problem is that the 'E' key is next to the 'R' key. The 'E' key is most used option in crontab, while the 'R' is most harmfull option that you can use in crontab. try # crontab -l >crontab.save # vi crontab.save # crontab crontab.save The "L" key is nowhere near the "R" key. There are other ways that crontabs can be lost, so it is nice to make a habit of keeping a backup this way. Hmmm. Not to be flippant over your loss, but there's lots of ways you can mess things up by typing a wrong option. "rm -f" is very close to rm -r on a QWERTY keyboard for example. I'm not going to change this because then we'd have to bulletproof the whole shell command line system. You can use "alias" to protect yourself much like dangerous commands such as "rm" and "mv" are aliased to interactive confirmation equivalents. The very big diference between rm and crontab is that crontab does not provides an interactive option. In rm, alias rm="rm -i" should work, but in crontab you don't have this option. And since crontab -r is so harmfull, and does not provides an "-i" option, there should be a warning message and a confirmation should be asked. Another thing you can say is: "You should make backups of your crontabs", but I think that is a lot easier to make a "Are you sure you want to delete your crontab" message, than search for your tape backup and restore your crontab copy. Please don't get me wrong, I'm not lazy, I just want Linux to be more friendly. So, the options "-f" and "-i" (as in rm) should be be available in crontab. |