Default crontab file location

 

Crontab configuration files of all users are available in path “/var/spool/cron/crontabs/”

If we list directory “/var/spool/cron/crontabs”, we can see root file and some files with usernames.

There will a crontab file for each user.

root file is for root user, user1 file is for user1, user2 file is for user2 and etc….

Depending on our requirement we can update these files.

To list available command in crontab use following command:

$ crontab -l

If we run crontab -l command from root user we can list commands configured in root users crontab and when they are going to execute, similarly we can list commands configured in other users crontab by logging into corresponding account.

To edit crontab use following command:

$ crontab -e

If you want to edit root user crontab login into root user and run crontab -e from root user.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s