cleaning /tmp directory
suvayu ali
fatkasuvayu+linux at gmail.com
Wed Mar 31 15:53:18 UTC 2010
On 31 March 2010 07:51, Tim <ignored_mailbox at yahoo.com.au> wrote:
> On Wed, 2010-03-31 at 15:58 +0200, Adalbert Prokop wrote:
>> There is no need to reinvent the wheel. Fedora comes with tmpwatch,
>> which does exactly what you want - scans /tmp (and possibly other
>> directories) and deletes unused files.
>
> Not quite... It will delete not recently looked at files, whether you
> actually used them or not. It's an important distinction, here's why:
>
> If you do something like list the contents of /tmp in Nautilus or
> Konqueror, or use any indexing thingy that looks through /tmp, you've
> just /read/ those files again, and reset the timeout. Do that often
> enough, and tmpwatch will never clear out those files.
>
> I've been careful to avoid doing any of that, and still find /very/ old
> files in the /tmp directory. I still haven't found out what's doing it.
>
I think you can play with the options [ -u | -m | -c ] to get what you want.
> --
> [tim at localhost ~]$ uname -r
> 2.6.27.25-78.2.56.fc9.i686
>
--
Suvayu
Open source is the future. It sets us free.
More information about the users
mailing list