Path: utzoo!attcan!uunet!husc6!mailrus!cornell!rochester!ritcv!cci632!ccicpg!nick
From: nick@ccicpg.UUCP (Nick Crossley)
Newsgroups: comp.unix.wizards
Subject: Re: Problem with find(1)
Summary: Use chmod
Message-ID: <26196@ccicpg.UUCP>
Date: 23 Sep 88 19:08:51 GMT
References: <108@forsight.Jpl.Nasa.Gov>
Reply-To: nick@ccicpg.UUCP (Nick Crossley)
Organization: CCI CPG, Irvine CA
Lines: 25

In article <108@forsight.Jpl.Nasa.Gov> roston@robotics.jpl.nasa.gov (Gerry Roston) writes:
>Ideally, I want to do the following:
>    find / -name news/spool -prune -o print ...
>however, this does not work.  My current solution is to do
>    find / -name news -prune -o print ...
>which has the affect of skipping ALL directories named news, and
>all of their subdirectories.
>
>Does anyone have any ideas how I can simply skip news/spool?

Whenever I want to do something like this, I just chmod 000 the directories
to be ignored.  This has the effect of making find skip those directories
with no error messages (at least on the systems I have used).

Of course, this might not be quite so easy if you need to allow access to
those directories from other processes running at the same time, as might well
be the case with news!

Also, don't forget to change the mode back afterwards ... :-)

-- 

<<< standard disclaimers >>>
Nick Crossley, CCI, 9801 Muirlands, Irvine, CA 92718-2521, USA
Tel. (714) 458-7282,  uucp: ...!uunet!ccicpg!nick