[arm-allstar] Is there a way to nerf “crontab -r”?
Doug Crompton
wa3dsp at gmail.com
Tue Sep 18 03:02:14 EDT 2018
Glenn,
I doubt it since it is a system command and we are not going to make
changes just for our code. The -ri option would ask but that is kind of
stupid because if you accidentally hit -r it would still just remove it.
Either be careful or I would suggest making a script to call it. I have
never accidentally done this but now that it is mentioned I probably will!
I would say make a script to call it - cronedit and add this to the script-
#!/bin/bash
crontab -e
save it and do chmod 750 cronedit
Then just run cronedit to edit cron. It needs to be in the search path or
have full path specified. Put it in /usr/local/sbin
*73 Doug*
*WA3DSP*
*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
On Tue, Sep 18, 2018 at 2:50 AM "Glenn Morgon via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:
> Was modifying my crontab and accidentally used the -r option instead of -e
> since the two keys are located next to each other. Unfortunately the damage
> was done and while I was able to pull from backups, I lost some
> intermediate changes.
>
> As such, is there a way to nerf the -r option so that it at least asks for
> confirmation before deleting the crontab file?
>
> Thanks,
> Glenn
> N8HC
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org
>
More information about the ARM-allstar
mailing list