home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / misc / 3310 < prev    next >
Encoding:
Text File  |  1992-08-20  |  1.4 KB  |  34 lines

  1. Newsgroups: comp.unix.misc
  2. Path: sparky!uunet!wupost!tulane!rouge!news.usl.edu!lar
  3. From: lar@ucs.usl.edu (Robert, Lane A.)
  4. Subject: Re: /tmp problems ...
  5. In-Reply-To: swanger@ducvax.auburn.edu's message of 19 Aug 92 20:29:02 GMT
  6. Message-ID: <LAR.92Aug20143808@smh336s.ucs.usl.edu>
  7. Sender: anon@usl.edu (Anonymous NNTP Posting)
  8. Reply-To: lar@usl.edu (Robert, Lane A.)
  9. Organization: Univ. of SW Louisiana, Lafayette
  10. References: <1992Aug19.152902.1@ducvax.auburn.edu>
  11. Date: Thu, 20 Aug 1992 20:38:08 GMT
  12. Lines: 20
  13.  
  14. In article <1992Aug19.152902.1@ducvax.auburn.edu>
  15. swanger@ducvax.auburn.edu writes:
  16.    In some of our public SUN Sparcstations, the /tmp subdirectories keep
  17.    filling up with "temporary" files until the file system is full.  These
  18.    files are left over from various jobs and are no longer needed.  These files
  19.    are erased whenever the workstations are rebooted, but we can't always
  20.    reboot when we want to.  I have considered creating a cron entry for each
  21.    workstation that will erase all of the files in /tmp once a day (say at
  22.    midnight or later).  However, jobs are running 24 hours a day and I am
  23.    afraid that I might accidently erase someone's temporary file(s) if I use 
  24.    this cron job.
  25.  
  26. Here is the cron job we use for this problem:
  27.  
  28.     0 3 * * * find /tmp -atime +2 -type f -exec rm {} \;
  29.  
  30. It removes all plain files that haven't been accessed in 2 days.
  31.  
  32. Lane
  33. lar@usl.edu
  34.