Take the 2-minute tour ×

I'm trying to add a line to the crontab on Ubuntu.

Right now, I'm doing crontab -e and editing the crontab there.

However, I can't seem to find the real crontab file, since crontab -e seems to give you a temporary working copy.

/etc/crontab looks like the system crontab.

What is the path of the crontab that crontab -e saves to?


share|improve this question

3 Answers 3

up vote 12 down vote accepted

Use crontab -l > file to list current user's crontab to the file, and crontab file, to install new crontab.

share|improve this answer

You can also do it without a temporary file:

(crontab -l ; echo "0 4 * * * myscript")| crontab -
share|improve this answer
cool! +1 . . . . . –  Abraham Van Helsing Dec 4 at 10:32

The user crontab file is in '/var/spool/cron/crontabs' for ubuntu.

adyliu@adyliu-pc:~$ sudo ls -lh /var/spool/cron/crontabs/adyliu
-rw------- 1 adyliu crontab 1.2K 2012-03-01 09:33 /var/spool/cron/crontabs/adyliu

'adyliu' is your login user.

You need root privilege to see this file.

Using "crontab -e" maybe is the best way to modify cron script.

In the manual:


share|improve this answer

Your Answer


