[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to find all the files that satisfy one set of conditions in dire
From: |
James Youngman |
Subject: |
Re: How to find all the files that satisfy one set of conditions in directories that satisfies another set of conditions in one 'find' command? |
Date: |
Tue, 26 Jun 2012 13:52:15 +0100 |
Since any file must exist in some directory (if it exists at all), the
first test can be simplified. Since we're launching a shell anyway,
we can just do the rest of the job there:
find . -name .export -exec sh -c 'for exportfile; for child in
"$(dirname $exportfile)"/*; [[ -x "$child" ]] && echo "$child"; done;
done' fnord {} \+
(this is also untested)
James.