How to Comment out a line in a Crontab on Linux
Firstly let’s just note that crontabs are read in the following way:
Your current crontabs can be viewed on your linux setup by typing in the following command:
|
|
Now to get to the point of this article, how would you temporarily disable a line/command without deleting the line? It’s quite simple actually, all you have to do is comment out that line / multiple lines by adding a hash in front of the line as follows:
Before:
|
|
After:
|
|
Note the trailing #
hash symbol which is how you comment out a line in a crontab.
Wasn’t that easy?