good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
safe cronby mincus (Chaplain) |
on Jun 14, 2005 at 13:56 UTC ( [id://466539]=CUFP: print w/replies, xml ) | Need Help?? |
After having my crontab deleted for the 3rd time from "fat fingering" -r instead of -e(they're so close!), I created this little script that adds a prompt to delete the crontab.
1) Create /usr/local/scripts/safe_crontab.pl with the code below. 2) Add this line to /etc/bashrc (or your personal .bashrc) alias crontab='/usr/local/scripts/safe_crontab.pl' 3) Run the following command: chmod 755 /usr/local/scripts/safe_crontab.pl 4) Log off and back on and you should be all set. Hope you find this useful.
Back to
Cool Uses for Perl
|
|