[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to exclude directories (and their subdirs) that contain a certai
From: |
James Youngman |
Subject: |
Re: How to exclude directories (and their subdirs) that contain a certain file? |
Date: |
Mon, 16 Apr 2012 18:45:55 +0100 |
On Sat, Apr 14, 2012 at 4:17 AM, Peng Yu <address@hidden> wrote:
> Hi,
>
> I'm wondering if there is an easy way to ignore all directories (and
> their subdirectories) that contain a certain file.
>
> For example, I have directories blah/a/ blah/a/b. I have
> blah/a/.ignore, so blah/a and everything in it are ignored.
You should be able to use -execdir for this by doing something like:
find . \( -type d -execdir test -e ./.ignore \; -prune \)
That probably won't do quite what you had in mind, but you can
experiment a bit. It's not efficient either, but I don't think there
is any help for that.
James.