Location of the crontab file

The location of cron files for individual users is /var/spool/cron/crontabs/.
From man crontab:

Each user can have their own crontab, and though these are files in /var/spool/cron/crontabs, they are not intended to be edited directly.


heemayl is correct about the location of crontab files on Linux, but it might be different on other operating systems and "theoretically" is could also be in a different location on Linux. Essentially, when a special interface is provided to access the files, you should use it. This will ensure that cron gets to check the files before installing them, makes sure the files have the permissions it needs them to have, etc...

Therefore you should copy a crontab from one user to another using that interface, like this, not by accessing the files directly.

crontab -u <user1> -l | crontab -u <user2>

Tags:

Filenames

Cron