I just had a weird experience and wanted to share it here to ask if anyone had a similar experience.
In the linux server, I was working on my crontab. My original plan was to type crontab with the option -l but I typed in my terminal as below.
crontab -;
The command above delete all the cron jobs I had and didn't leave anything. I couldn't find any blog or posts about the above command doing something. What could be the behind logic of this?!
Top comments (2)
Hope it wasn't a production server. Otherwise, it's hilarious.
From the manpage, the
crontab
has two forms:It's possible the command above got interpreted as the first form and a new crontab with just
;
inside of it was installed.Apart from guess above, I have no idea. But, it's interesting. Glad I am no longer around servers.
Thanks for the reply! Well thankfully we were working in our development server so everyone is safe!
I wasn't aware of the first form so it's something new for me that I need to look up. Thanks for the help!