Thanks Gus. Still trying to get my head around the obscurities of ``find'' -
will continue reading the doco(s).

At this stage, it looks like I'll end up with something like

        find /path -path /path1 -prune -o -path /path2 -prune ... -o print

and writing a script for it,

        while read i; do
                ARGS="$ARGS -path $i -prune -o "
        done < exclude-list
        eval find /path $ARGS -o print

I have a feeling that I can achieve the same thing with less complexity with
xargs. Would this be true ?

-----Original Message-----
From: Angus Lees [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 11 June 2002 9:06
To: Minh Van Le
Cc: [EMAIL PROTECTED]
Subject: Re: How to exclude a list of directories using GNU Find


At Tue, 11 Jun 2002 04:19:46 +1000, Minh Van Le wrote:
> I'm using GNU Find to create a snapshot of files and their attributes in a
> backup script. What I can't find in the manual is an option to exclude
> specific file systems & directories, or a similar function to
> Tar's --exclude-from option. Find's -mount option prevents descent into
> "other" filesystems, which is not flexible enough as I need to create
> snapshots for numerous "other" filesystems.

you want the "-prune" action. for example:

 find /path -path /path/excludeme -prune -o -print

--
 - Gus

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to