>> > find / -name afs -prune -o -name core -atime +7 -exec rm -f {} \; -o -fsty
pe nfs -prune
>> 

Since this seems to be generating alot of traffic, I thought I'd throw my
two cents worth in. Here's how we do our find stuff to stay OUT of /afs:
(I deleted the rest of the line show the real action, not interesting)
Perhaps noteworthy is all our AFS stuff lives under /afs.

# clean up any trash files that are older than 3 days
40 4 * * * find /[A-Zb-z]* -fstype nfs -prune

Another thing I accidentally discovered reading the man page for find
(from SunOS 4.x) was a "database" in /usr/lib/find. This "database" could
be manipulated and updated. Much to my suprise there was already a reference
to /afs in that file on my Sun4m machine !!! No one here knew who/how that
file was modified. All our other Sun4c machines do not have that EXCLUDE
entry filled.

Maybe a difference in the Sun4c and Sun4m install procedures ???

To be honest I don't know what this functionality (yet) nor how to use it.
Anyone else out there know what this is for ?

I include a fragment from the file /usr/lib/find/updatedb:
(NOTE: see the EXCLUDE line)

8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------

#! /bin/sh
# @(#)updatedb.sh 1.2 89/09/15 SMI from UCB 4.6 85/04/22
# build "fast find" database -- normally run from crontab

UFSPATHS=/src:/usr/local                        # directories to be put in the atabase
EXCLUDE=/afs            # directories to exclude
NFSPATHS=                       # NFS directories
NFSUSER=daemon                  # userid for NFS find
LIBDIR=/usr/lib/find            # for subprograms
FINDHONCHO=root                 # for error messages
FCODES=$LIBDIR/find.codes       # the database

if [ $# -eq 0 ] ; then
        UFSPATHS="/"
        EXCLUDE='^/tmp|^/dev|^/usr/tmp|^/var/tmp'
        NFSPATHS=
elif set -- `getopt n:o:x: $*` ; then
        for arg
        do
                case $arg in
                -n) NFSPATHS="$NFSPATHS $2" shift 2 ;;
                -o) FCODES="$2" shift 2 ;;
8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------

Tim Ehrhart










Reply via email to