On 2010-10-19 Kevin Buchs <kevin.buchs.j...@gmail.com> wrote:
> 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
[...]

find -name .snapshot -prune -or -print

hth, cu andreas

Reply via email to