Get the App
SLTechnology News&Howtos  ›  Servers  › 

Example Analysis of crontab Quick comment and revocation comment

Shulou Source: shulou.com Published: 2022-06-01 03:26:29 10月03日 Update

Crontab quick comments and withdraw comments example analysis, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

We know that in general, writing crontab requires editing using a vi editor. With the vi editor, you can easily add the comment symbol'#'to the front of each line, or you can easily use the vi editor to remove the commented'# 'from each line.

Batch Quick comment and undo comment:

First use crontab-e to edit crontab

$crontab-e

Then use the following editing command from vi

:% s / ^ / # /

You can comment out the scheduled tasks by adding a'#'in front of them.

Similarly, after some operations are completed, edit the crontab first.

$crontab-e

Use the following editing commands

:% s / ^ # /

You can talk about the scheduled tasks of all the comments last time and cancel them all.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Tags: Comments editors one line tasks commands help examples analysis clarity content this situation articles novices more knowledge symbols industry information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info NVidia Huawei Shulou Information macOS