clean out /tmp?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Is there a way to keeping my /tmp's cleaned out in FC?

I had what I thought was the perfect answer to keeping my /tmp's trim and in
shape by using cron scripts - but, it appears to apply to suse only?  (See
bellow.)

Regards,
Morgan.

-------- Original Message --------
Subject: Re: [nzlug] clean out /tmp?
Date: Mon, 26 Sep 2005 09:53:21 +1200
From: Volker Kuhlmann <hidden@xxxxxxxxxxxxxxx>
Reply-To: NZLUG Mailing List <nzlug@xxxxxxxxxxxx>
To: NZLUG Mailing List <nzlug@xxxxxxxxxxxx>
References: <43313D6F.2010803@xxxxxx>
<a96bb250050921042435a1a7fb@xxxxxxxxxxxxxx>
<1127330910.5889.1.camel@localhost>	<20050921205731.GA672@xxxxxxxxxxxxxxx>
<433684DF.1050800@xxxxxx>

> I got to having a look at this cron file and I have no /etc/sysconfig/cron.
> I'm running FC4, is it likely to have a different set-up?

Looks like it, yes. I use SuSE.

> Other things that may be relevant:
> - /etc/cron.d/ (empty)
> - /etc/cron.hourly/ -> ... /cron.monthly/
> - /etc/crontab

This is the mechanism to control a standard unix cron daemon. In turn,
the scripts in these directories (and in /etc/init.d/) read
/etc/sysconfig/cron and act on it.

> - /etc/sysconfig/crond (which doesn't contain the text)

This looks like it's the equivalent file for FC. If you can't find any
commments in this file relating to clearing temp directories, than I'd
conclude that FC isn't as sophisticated in this department.

> If your /etc/sysconfig/cron isn't personal, can you copy it across (and
> would it work)?

The file is not personal, you can find it in the package
ftp://ftp.opensuse.org/pub/opensuse/distribution/SL-10.0-OSS-RC1/inst-source/suse/i586/aaa_base-10.0-27.i586.rpm
at /var/adm/fillup-templates/sysconfig.cron. No it would not work unless
you also installed the (parts of) the scripts which read this file.
These are
/etc/init.d/boot.cleanup
/etc/cron.daily/suse.de-clean-tmp
in the same package. You're on your own surgically implanting the
correct parts into FC.

>> The easiest would seem to be to edit /etc/sysconfig/cron and the system
>> will do the rest. The guts of that are below.
>> 
>> Volker
>> 
>> 
>> # cron.daily can check for old files in tmp-dirs. It will delete all files
>> # not accessed for more than MAX_DAYS_IN_TMP. If MAX_DAYS_IN_TMP is not set
>> # or set to 0, this feature will be disabled. 
>> #
>> MAX_DAYS_IN_TMP="7"
>> 
>> ## Type:	string
>> ## Default:	"/tmp"
>> #
>> # This variable contains a list of directories, in which old files are to
>> # be searched and deleted. The frequency is determined by MAX_DAYS_IN_TMP
>> #
>> TMP_DIRS_TO_CLEAR="/tmp /var/tmp"
>> 
>> # "Set this to "yes" to entirely remove (rm -rf) all  files and subdirectories
>> # from the temporary directories defined in TMP_DIRS_TO_CLEAR on bootup.
>> # Please note, that this feature ignores OWNER_TO_KEEP_IN_TMP - all files will
>> # be removed without exception."
>> #
>> # If this is set to a list of directories (i.e. starts with a "/"), these
>> # directories will be cleared instead of those listed in TMP_DIRS_TO_CLEAR.
>> # This can be used to clear directories at boot as well as clearing unused
>> # files out of other directories.
>> #
>> CLEAR_TMP_DIRS_AT_BOOTUP="/tmp"

HTH,

Volker

-- 
Volker Kuhlmann			is possibly list0570 with the domain in header
http://volker.dnsalias.net/		Please do not CC list postings to me.

_______________________________________________
NZLUG mailing list NZLUG@xxxxxxxxxxxx
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug


-- 
Morgan Read
<mailto:mstuffATplDOTnet>

get a life; GET FIREFOX!
<www.getfirefox.com>
WHY ME?  Read on:
<http://www.theregister.co.uk/2004/06/28/cert_ditch_explorer/>
<http://www.theregister.co.uk/2004/09/13/german_ie_jitters/>

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux