Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Feb 2011 23:21:20 +0000
From:      Mike Clarke <>
Cc:        Martin McCormick <>
Subject:   Re: Using Multiple -prune directives in a find command
Message-ID:  <>
In-Reply-To: <>
References:  <>

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: <>