Posted By: Anonymous
If I want find the differences between two directory trees, I usually just execute:
diff -r dir1/ dir2/
This outputs exactly what the differences are between corresponding files. I’m interested in just getting a list of corresponding files whose content differs. I assumed that this would simply be a matter of passing a command line option to
diff, but I couldn’t find anything on the man page.
You said Linux, so you luck out (at least it should be available, not sure when it was added):
diff --brief --recursive dir1/ dir2/ # GNU long options diff -qr dir1/ dir2/ # common short options
Should do what you need.
If you also want to see differences for files that may not exist in either directory:
diff --brief --recursive --new-file dir1/ dir2/ # GNU long options diff -qrN dir1/ dir2/ # common short options