-   Slackware (
-   -   Strange Cron directories: /var/spool/cron/cron.GfqqGO (

Woodsman 05-11-2011 01:10 PM

Strange Cron directories: /var/spool/cron/cron.GfqqGO
I notice these strange directories in /var/spool/cron. They are created each time I start dcron. All of them are empty.

I haven't found anything addressing what these empty directories are for or why dcron does not perform any house keeping to delete the empty directories.

What are they for?


audriusk 05-11-2011 01:29 PM

I'd also like to know the purpose of those directories (and how to get rid of them, if possible). Have stumbled upon them in the past, but totally forgot it later. Thanks Woodsman for asking this!

Woodsman 05-11-2011 01:35 PM

Deleting the empty directories is straightforward:

find /var/spool/cron -type d -name cron.* -empty -exec rm -fr {} \;

Place that command in a cleanup script or rc.shutdown. :)

audriusk 05-11-2011 01:40 PM

Well, yes, but by getting rid of them I meant to prevent them appearing in /var/spool/cron in the first place. That would be the best solution for me. :)

GazL 05-11-2011 02:37 PM

I noticed these a while ago and did a bit of digging into it. From what I was able to discover it seems the directories are used by cron to hold temporary files used when passing the output of any cron jobs to the mail subsystem (i.e. sendmail). Unfortunately for those of us who reboot daily, it tends to create one each time it is started and doesn't clean them up, which is somewhat annoying.

P.S. I put the find/delete in rc.M just before crond is started. (on reflection, rc.6 might be a better choice)

All times are GMT -5. The time now is 03:42 PM.