[nycbug-talk] find exclude question
George Georgalis
george
Mon Oct 17 14:01:29 EDT 2005
On Mon, Oct 17, 2005 at 01:34:37PM -0400, N.J. Thomas wrote:
>* Steve Rieger <steve.rieger at tbwachiat.com> [2005-10-17 13:22:28 -0400]:
>> i would like to run the following find /path/to/dir -atime +14 --
>> exclude dir1,dir2 -exec rm -fr {} \ ;
>>
>> i want to exclude dir1 and dir2 from this find
>
>You want "-prune", as in:
>
> find /path/to/dir \( -path /path/to/dir/dir1 -o -path /path/to/dir/dir2\) -prune -o -print
Isn't that the oppisit of requested? eg prune returns the trimmings
find . ! \( -path '*/CVS' -prune \)
// George
--
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george at galis.org
More information about the talk
mailing list