110.clean-tmps revision 44926
128263Spst#!/bin/sh 228263Spst# 344926Sjoerg# $Id: 110.clean-tmps,v 1.3 1997/09/11 15:21:30 ache Exp $ 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 && { 1544926Sjoerg find . -type f -atime +3 -ctime +3 ! -name '.X*-lock' -delete 1644926Sjoerg find -d . ! -name . -type d -mtime +1 -delete 1728263Spst } 1828263Spstfi 1928263Spst 2028263Spstif [ -d /var/tmp ]; then 2128263Spst cd /var/tmp && { 2244926Sjoerg find . ! -name . -atime +7 -ctime +3 -delete 2344926Sjoerg find -d . ! -name . ! -name vi.recover -type d -mtime +1 -delete 2428263Spst } 2528263Spstfi 26