110.clean-tmps revision 50472
128263Spst#!/bin/sh
228263Spst#
350472Speter# $FreeBSD: head/etc/periodic/daily/110.clean-tmps 50472 1999-08-27 23:37:10Z peter $
428263Spst#
528263Spst# Use at your own risk, but for a long-living system, this might come
628263Spst# more useful than the boot-time cleaning of /tmp.  If /var/tmp and
728263Spst# /tmp are symlinked together, only one of the below will actually
828263Spst# run.
928263Spst#
1028263Spst
1128263Spstexit 0		# do not run by default
1228263Spst
1328263Spstif [ -d /tmp ]; then
1428263Spst    cd /tmp && {
1547861Sbrian	find . -type f -atime +3 -ctime +3 ! -name '.X*-lock' \
1647861Sbrian	    ! -name quota.user ! -name quota.group -delete
1744926Sjoerg	find -d . ! -name . -type d -mtime +1 -delete
1828263Spst    }
1928263Spstfi
2028263Spst
2128263Spstif [ -d /var/tmp ]; then
2228263Spst    cd /var/tmp && {
2344926Sjoerg	find . ! -name . -atime +7 -ctime +3 -delete
2444926Sjoerg	find -d . ! -name . ! -name vi.recover -type d -mtime +1 -delete
2528263Spst    }
2628263Spstfi
27