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