home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!timbuk.cray.com!shamash!uc.msc.edu!apctrc!wsc!vnet74!vxrserve!stmckenna
- From: stmckenna@nap.amoco.com (Stephen T. McKenna)
- Newsgroups: comp.sys.sun.misc
- Subject: Re: Why does OW leave all kind of garbage in tmp?
- Message-ID: <1992Jul24.193216.25905@nap.amoco.com>
- Date: 24 Jul 92 19:32:16 GMT
- References: <CKD.92Jul23233441@loiosh.eff.org>
- Sender: news@nap.amoco.com
- Reply-To: stmckenna@nap.amoco.com
- Organization: Amoco Research Center
- Lines: 27
-
-
- In article 92Jul23233441@loiosh.eff.org, ckd@eff.org (Christopher Davis) writes:
- >HEM> == hillel.e.markowitz <hillel@cbnewsf.cb.att.com>
- >
- > HEM> I would say that putting the following crontab (or similar) should
- > HEM> be enough. After all, cleaning up once a week should be sufficient.
- >
- > HEM> 5 4 * * 6 rm -f /tmp/*
- >
- > HEM> Of course this assumes that nobody leaves anything important on /tmp.
- >
- >Like their /tmp/.X11-unix/* sockets for example? (I think screen and
- >the Emacs emacsclient and gnuclient packages also put sockets there...)
- >
- >More than one person has found something breaking after a similar
- >crontab was installed. (They probably installed it because of OW :-)
-
-
- It's not just OW; Sunview cmdtools leave their backing files there too
- (usually they get emptied on exit though). Nothing deletes them unless you
- do it yourself using cron. But you're right, it's a bad idea (I know from
- experience...) to delete sockets and some other things from /tmp. Also I
- like to let things go a day or two without being accessed before I just nuke
- them. Here's what we use:
-
- 10 0 * * * find /tmp \( -type d -a -name .\* \) -prune -o ! -type s -atime +1 -exec \rm -fr '{}' \;
- 15 0 * * * find /tmp /var/tmp -type f -size 0 -atime +1 -exec \rm -fr '{}' \;
-