1997-08-16 17:04:02 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1997-08-16 17:04:02 +00:00
|
|
|
#
|
|
|
|
# Use at your own risk, but for a long-living system, this might come
|
|
|
|
# more useful than the boot-time cleaning of /tmp. If /var/tmp and
|
|
|
|
# /tmp are symlinked together, only one of the below will actually
|
|
|
|
# run.
|
|
|
|
#
|
|
|
|
|
|
|
|
exit 0 # do not run by default
|
|
|
|
|
|
|
|
if [ -d /tmp ]; then
|
|
|
|
cd /tmp && {
|
1999-06-10 00:34:15 +00:00
|
|
|
find . -type f -atime +3 -ctime +3 ! -name '.X*-lock' \
|
|
|
|
! -name quota.user ! -name quota.group -delete
|
1999-03-21 12:34:06 +00:00
|
|
|
find -d . ! -name . -type d -mtime +1 -delete
|
1997-08-16 17:04:02 +00:00
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d /var/tmp ]; then
|
|
|
|
cd /var/tmp && {
|
1999-03-21 12:34:06 +00:00
|
|
|
find . ! -name . -atime +7 -ctime +3 -delete
|
|
|
|
find -d . ! -name . ! -name vi.recover -type d -mtime +1 -delete
|
1997-08-16 17:04:02 +00:00
|
|
|
}
|
|
|
|
fi
|