This commit was manufactured by cvs2svn to create tag 'FreeBSD-release/1.0'.
[unix-history] / gnu / libexec / uucp / contrib / uuclean
CommitLineData
78ed81a3 1# This is a sample uuclean shell script
2# Copyright (C) 1992 Ian Lance Taylor
3# Do whatever you like with this script.
4#
5# Set some variables
6bindir=/usr/local/bin
7spooldir=/usr/spool/uucp
8#
9# Warn about all mail over two days old
10$(bindir)/uustat -c rmail -o 48 -N -Q -W"Unable to deliver; will try up to one week"
11# Return all mail over a week old
12$(bindir)/uustat -c rmail -o 168 -K -M -N -Q -W"Could not be delivered for over one week"
13# Throw away other requests over a week old
14$(bindir)/uustat -o 168 -K -M -N -Q -W"Over one week old"
15# Throw away any executions over three days old
16$(bindir)/uustat -o 72 -M -N -Q -W"Unable to execute for three days"
17#
18# Now delete any old spool files
19find $(spooldir) -ctime +8 -name '[CDX].*' -print -exec rm -f \{\} \;
20# Delete any old temporary files
21find $(spooldir) -atime +1 -ctime +1 -name 'TM.*' -print -exec rm -f \{\} \;
22# Delete any old preserved files
23find $(spooldir)/.Preserve -atime +14 -ctime +14 -print -exec rm -f \{\} \;