Michael C. Toren on Fri, 1 Nov 2002 15:51:22 -0500 |
> You might run a daily cron job consisting of something like the > following: > > find /tmp /var/tmp -atime 7 -type f -print0 |xargs -0 rm You'll probably want to use "+6", rather than "7", to find any files which haven't been accessed in seven or more days, rather than exactly seven days ago. > (If you do this, *don't* mount any filesystems on /tmp! It never Or, you can use find(1)'s -xdev command line option, which will prevent it from descending directories on other file systems. -mct
|
|