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

clean out /tmp?

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


-------- Original Message --------
Subject: Re: [nzlug] clean out /tmp?
Date: Mon, 26 Sep 2005 09:53:21 +1200
From: Volker Kuhlmann <hidden paradise net nz>
Reply-To: NZLUG Mailing List <nzlug linux net nz>
To: NZLUG Mailing List <nzlug linux net nz>
References: <43313D6F 2010803 pl net>
<a96bb250050921042435a1a7fb mail gmail com>
<1127330910 5889 1 camel localhost>	<20050921205731 GA672 paradise net nz>
<433684DF 1050800 pl net>

> 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
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
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. 
>> #
>> ## 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.
>> #



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 linux net nz

Morgan Read

get a life; GET FIREFOX!
WHY ME?  Read on:

Attachment: signature.asc
Description: OpenPGP digital signature

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