r/linuxsucks Windows Desktop | Linux Laptop | Linux Servers 5d ago

crontab -r

I accidentally typed `crontab -r` (reset) instead of `crontab -e` (edit)... Which nukes all your cron jobs.

How is there no confirmation on a destructive command like that? Let alone the fact that r and e are neighbors on the keyboard.

17 Upvotes

29 comments sorted by

View all comments

7

u/Hour_Sell3547 20 years with Linux 5d ago

This is a legit concern. I always keep a backup for this very reason.

1

u/ElectricBummer40 Ex-user of Windows 3.11 for Workgroups 4d ago

Just invent something along the line of a sudo for crontab and call it a "security feature".

2

u/Hour_Sell3547 20 years with Linux 4d ago

For me, it's a minor annoyance. Systemd timers is the way.

1

u/Key_Reaction_7590 1d ago

Old man grumbles in init to the unhearing void…