bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

find - avoiding subtrees & Permission denied messages


From: Kevin Buchs
Subject: find - avoiding subtrees & Permission denied messages
Date: Mon, 18 Oct 2010 19:02:16 -0500

I often find myself wanting to use find, but avoid searching any
subdirectories called .snapshot, which contain our hourly online backups.
My attempt below seems to fail, for find is trying to access subdirectories
of .snapshot, for which I have no permission and I get the Permission denied
messages (many).  I wonder if there is some other trick to avoiding any
traversal of .snapshot directories anywhere on the tree?  

 

find ! -path '*/\.snapshot/*' -iname windrv6.inf

find: ./.snapshot/hourly.0/All_Contracts_Projects/eCAS/Source: Permission
denied

 

In addition to -path, I tried -wholename.  I tried initially without the
backslash escape of the period.  I didn't expect I'd need to escape it, but
I was grabbing for something.

 

I would find an enhancement to find which would omit the messages saying
"Permission denied".  I often have a forest of those and can't see the true
hits.  I started looking into the source for find for about an hour and
didn't find what is causing the message to be generated.  I think it must be
buried in some errno processing.  If I can find this, I'll be happy to
generate a patch to create another command line option and share it back.  

 

 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]