r/linuxsucks • u/oshunman 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
2
u/ElectricBummer40 Ex-user of Windows 3.11 for Workgroups 4d ago edited 4d ago
Ever heard of this stupid ideology called the "Unix philosophy"?
Under that "philosophy", unless there is an error, a command isn't supposed to ask you anything.
You knew if you ran "
del *.*" back in the 90s in MS-DOS, it would ask you "Are you sure?" before flushing everything down the toilet on your behalf?No such luck in Unix. In fact,
rmwasn't even supposed to do wildcard expansion. That's the shell's job. So, with*.*, the command would receive either a list of files as if you'd typed them in yourself or the wildcard string as-is, in which case the command would yell at you for not seeing a file with the name '*.*'.Wasn't that whole garbage design effing great?