Created
January 8, 2014 11:00
-
-
Save markeganfuller/8315094 to your computer and use it in GitHub Desktop.
Disable crontab -r (remove)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable crontab -r | |
function crontab () | |
{ | |
# Replace -r with -e | |
/usr/bin/crontab "${@/-r/-e}" | |
} |
how to use this? where to place it?
desired outcome is running crontab -r
in shell would not result in deleting crontab tasks. it can output warning message this is not what you want
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1000 for this. Just learned about the -r flag the hard way.