Re: cleaning /tmp directory
- From: Tom H <tomh0665@xxxxxxxxx>
- Date: Wed, 31 Mar 2010 16:28:45 -0400
i need a cron script that cleans every day crap into /tmp
I have there a lot of temp files but i dunno which ones can be safely wiped,
and it is very time comsuming job, too.
There already is a cron that will delete file out of /tmp that are 10 days old.
In addition, at shutdown time everything in /tmp is fair game for
deletion. As one of the last things done on all my machines I clean out
/tmp. In my case the reason isn't space, but clutter. With the default
/tmp cleaning, things build up to such a level that downloaded files
that I only want to look at once are hard to find (such as pdf files
etc).
Put this in /sbin/halt.local mode 755.
#!/bin/sh
###############################################################################
## ##
## File: halt.local ##
## Author: Wolfgang S. Rupprecht <wolfgang@xxxxxxxxx> ##
## Created: Thu Jun 7 23:47:14 PDT 2007 ##
## Contents: wsrcc site-specific halt stuff ##
## ##
## Copyright (c) 2007 Wolfgang S. Rupprecht. ##
## All rights reserved. ##
## ##
## $Id$ ##
###############################################################################
# wsrcc halt script
echo "WSRCC: Clearing /tmp"
cd /
/bin/rm -rf /tmp/* /tmp/.??*
sync; sync; sync;
Or turn /tmp into a tmpfs mount.
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
- References:
- cleaning /tmp directory
- From: Maurizio Marini
- Re: cleaning /tmp directory
- From: Gregory Hosler
- Re: cleaning /tmp directory
- From: Wolfgang S. Rupprecht
- cleaning /tmp directory
- Prev by Date: Re: cleaning /tmp directory
- Next by Date: Changing Permissions to The Audio Device
- Previous by thread: Re: cleaning /tmp directory
- Next by thread: Re: cleaning /tmp directory
- Index(es):
Relevant Pages
|