LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-11-2011, 01:10 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
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?

Thanks.
 
Old 05-11-2011, 01:29 PM   #2
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 248

Rep: Reputation: 107Reputation: 107
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!
 
Old 05-11-2011, 01:35 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
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.
 
Old 05-11-2011, 01:40 PM   #4
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 248

Rep: Reputation: 107Reputation: 107
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.
 
Old 05-11-2011, 02:37 PM   #5
GazL
Senior Member
 
Registered: May 2008
Posts: 3,426

Rep: Reputation: 937Reputation: 937Reputation: 937Reputation: 937Reputation: 937Reputation: 937Reputation: 937Reputation: 937
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)

Last edited by GazL; 05-11-2011 at 03:07 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/crontab vs /etc/cron.d vs /var/spool/cron/crontabs/ drManhattan Linux - Newbie 9 01-04-2011 01:12 AM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U Suse/Novell 11 01-04-2007 01:57 AM
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 01:50 PM
Failed to lock file /var/spool/cron/root after 5 minutes teeno Linux - Software 0 09-24-2003 02:49 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration