System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

/var/spool/cron/tmp what is this for?

SOLVED
Go to solution
Todd McDaniel_1
Honored Contributor

/var/spool/cron/tmp what is this for?

I think it is just a tmp area for starting cron jobs, but I had a cron script go hauwire this morning and write out a 27MB file there which pushed my already overfull /var to 100%...

I have since reduced it back to 57%.

But what is this dir? /var/spool/cron/tmp Do I have it right?

Should I go ahead and link it to /tmp.
Unix, the other white meat.
6 REPLIES
Steven E. Protter
Exalted Contributor

Re: /var/spool/cron/tmp what is this for?

In mine its a bunch of empty files. If the process was killed for some reason then there is a processed killed message.

The data appears to be cron related and clear text. It should be okay to locate it elsewhere with linking.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Cheryl Griffin
Honored Contributor

Re: /var/spool/cron/tmp what is this for?

/var/spool/cron/tmp is usually filled with cron output (crout...) files.

These files are created and (should be) removed by the system as cron jobs are processed.

Old crout files can be periodically cleared out.

Would it be ironic/redundant to say that you could create a cron job to remove old cron files?
"Downtime is a Crime."
Robert-Jan Goossens
Honored Contributor
Solution

Re: /var/spool/cron/tmp what is this for?

Hi Todd,

If you get an error reported by cron and the cron entry does not redirect to sdout /dev/null 2>&1 error output files will be created in /var/spool/cron/tmp.

Hope this helps,
Robert-Jan
doug hosking
Esteemed Contributor

Re: /var/spool/cron/tmp what is this for?

I don't want to get into specifics in a public forum but /var/spool/cron/tmp was specifically created to address a security issue. I do not recommend that you link it to another directory.
Mahesh_Dadi
Frequent Visitor

Re: /var/spool/cron/tmp what is this for?

HI Robert,

 

can we delete these files files from /var/spool/cron/tmp/* becoz if these error logs and crossing more 1 GB size.

 

With Regards,

Mahesh

Dennis Handly
Acclaimed Contributor

Re: /var/spool/cron/tmp what is this for?

>can we delete these files files from /var/spool/cron/tmp/*

 

Not unless you kill the cronjob first, otherwise the space will still be taken.