home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / sun / misc / 3335 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  1.7 KB

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