Linux / UNIX Crontab File Location

by Vivek Gite on September 19, 2008 · 2 comments

I login to my UNIX system as a normal user. However, I need to update my cronjob entry. But, I can't find where the crontab file is. How do I find out my crontab file location?

By default cron searches its spool area /var/spool/cron/crontabs directory for crontab files. All files which are named after username i.e. accounts in /etc/passwd file. So if your username is vivek, crontab file location should be /var/spool/cron/crontabs/$USER i.e. /var/spool/cron/crontabs/vivek. Note that crontabs in this directory should not be accessed directly - the crontab command should be used to access and update them as follows:
crontab -e
To view your crontab file (cron jobs) type
crontab -l

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 2 comments… read them below or add one }

1 Keul April 15, 2011

use -u switch to see crontab of other user (must be root).
eg :
crontab -eu apache

Reply

2 khairul May 16, 2011

usually we use command
crontab -e
than after that, it will show like below:
2 9 * * * sh /oraias/mid/cronjob/back_pll.sh
25 12 * * * sh /autopatch/script/zipto_patch.sh
~
~
~
~
~
~
“/var/tmp/aaaa14682″ 5 lines, 143 characters

so..as usually the file is located at /var/tmp
and the file name is aaaa14682.

so…try go to folder /var/tmp and then more aaaa14682

may it will help u..

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 6 + 8 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: