Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!kunivv1!atcmpe!leo From: leo@atcmp.nl (Leo Willems) Newsgroups: comp.unix.questions Subject: Re: Way to get find to skip a directory? Message-ID: <586@atcmpe.atcmp.nl> Date: 7 Apr 90 19:34:29 GMT References: <133@dynasys.UUCP> Organization: AT Computing, Nijmegen, The Netherlands Lines: 30 From article <133@dynasys.UUCP>, by jessea@dynasys.UUCP (Jesse W. Asher): > Is there a way to get find to skip a directory when searching? An example > would be that I want to search /usr for something but I know it's not going > to be in /usr/spool/news. Is there any way I can get it to search /usr > but skip /usr/spool/news (which can take forever to scan)? Thanx in advance. > Try: cd /usr find `ls | grep -v spool` -print | some_prog This implies that your version of find(1) must be able to accept more than one starting point in a tree. Not all find versions do. In that case try this: ( cd /usr for i in `ls | grep -v spool` do find $i -print done ) | some_prog Leo Willems Internet: leo@atcmp.nl AT Computing UUCP: mcvax!hp4nl!kunivv1!atcmpe!leo P. O. Box 1428 6501 BK Nijmegen Phone: +31-80-566880 The Netherlands Fax: +31-80-555887