Crobtab -r (oops)

Zarathustra[H]

Extremely [H]
Joined
Oct 29, 2000
Messages
38,741
Heads up.

Back up your crobtab.

I just learned this one the hard way.

R is right next to E on the keyboard.

"Crontab -e" edits your crobtab, and "crontab -r" deletes your entire cron file without confirmation.... :oops:

I love Linux and Unix systems, I really do. But this one is just boneheaded...

I just grepped all my syslogs for the word CRON. Hopefully I can reconstruct this tomorrow :(

Luckily most of the details are in bash scripts just launched from cron, and not in the crontab itself.
 
Last edited:
What does the sudo remind you of? Something about great power and great responsibility? ;)
 
What does the sudo remind you of? Something about great power and great responsibility? ;)

Agreed, but typos happen, especally when two keys are right next to eachother, and this one really ought to have a confirmation.

"Are you sure you want to delete crontab (Y/N)"

I'm surprised this doesn't happen more often. This is my first time in a couple of decades.
 
Back
Top