Is there a way I can perform a recursive diff of two directories but only compare (in their respective places) files that match a specific filename or filetype predicate?
E.g. I would like to do something like
diff -r dir-a dir-b -filenames *.java, ivy.xml, build.xml
... or even better:
diff -r dir-a dir-b -filetype text
Clearly it is not mandatory to use diff
as I suppose an incantation with find
and -exec diff
might also do the trick (I just don't know how to generate the complementary filepaths in the latter case).