110.clean-tmps revision 47861
1#!/bin/sh 2# 3# $Id: 110.clean-tmps,v 1.4 1999/03/21 12:33:54 joerg Exp $ 4# 5# Use at your own risk, but for a long-living system, this might come 6# more useful than the boot-time cleaning of /tmp. If /var/tmp and 7# /tmp are symlinked together, only one of the below will actually 8# run. 9# 10 11exit 0 # do not run by default 12 13if [ -d /tmp ]; then 14 cd /tmp && { 15 find . -type f -atime +3 -ctime +3 ! -name '.X*-lock' \ 16 ! -name quota.user ! -name quota.group -delete 17 find -d . ! -name . -type d -mtime +1 -delete 18 } 19fi 20 21if [ -d /var/tmp ]; then 22 cd /var/tmp && { 23 find . ! -name . -atime +7 -ctime +3 -delete 24 find -d . ! -name . ! -name vi.recover -type d -mtime +1 -delete 25 } 26fi 27