> I need to use find with multiple make patterns. Is there any way to do
> the equivalent of:
> find . -name "*.mk" -name "*ake*" -print
> How can this be done simply, in 1 command line (so i can -exec something
> on these files)
By default, find's operators are stringed along as logical AND. So, in your case
all files whose names end in .mk and then contain the string 'ake' somewhere
in the filename are printed out.But what we need is the OR on the filenames.
Note: all dot files are being ignored here.
find . \( -name '*.mk' -o -name '*ake*' -o \
-name '.*.mk' -o -name '.*ake*' \) \
-exec ... do something with the captured files \;