Date: Mon, 7 Feb 2011 23:21:20 +0000 From: Mike Clarke <jmc-freebsd2@milibyte.co.uk> To: freebsd-questions@freebsd.org Cc: Martin McCormick <martin@dc.cis.okstate.edu> Subject: Re: Using Multiple -prune directives in a find command Message-ID: <201102072321.21035.jmc-freebsd2@milibyte.co.uk> In-Reply-To: <201102072056.p17Ku5Da097335@x.it.okstate.edu> References: <201102072056.p17Ku5Da097335@x.it.okstate.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 07 February 2011, Martin McCormick wrote: > Can one use the -prune directive multiple times in a > find command to specify a list of directories not to descend? > > It would be like > > find . -name "*" -prune dir1 -prune dir2 -print > > or whatever you wanted find to do, but that does not work or I > wouldn't be asking. Find appears to get confused and thinks dir1 > is a command. find . -type d -name dir1 -prune -o -name dir2 -prune -o -name \* ... should list all files except those in dir1 or dir2 -- Mike Clarke
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102072321.21035.jmc-freebsd2>