Managing the crontab entry
We don't add or modify an entry of a crontab directly. It is done by using the crontab
command that allows you to add, modify, and list crontab entries. Each user can have their own crontab where they can add, delete, or modify tasks. By default, it is enabled for all users, but if a system administrator wants to restrict some of the users, he or she can add that user in the /etc/cron.deny
file.
The syntax of using the crontab
command is as follows:
crontab [-u user] file crontab [-u user] [option]
The options of the crontab are explained in the following table:
Option |
Description |
---|---|
|
Appends the name of the user whose |
|
Displays the current crontab on |
|
Edit the current |
|
Remove the current |
|
Interactive removal of the current |
Listing crontab entries
To list the crontab
entries, we use the -l
option for...