Skip to content
Advertisement

Given two directory trees, how can I find out which files differ by content? [closed]

If I want find the differences between two directory trees, I usually just execute:

JavaScript

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.

Any suggestions?

Advertisement

Answer

Try:

JavaScript

Or alternatively, with the short flags -qr:

JavaScript

If you also want to see differences for files that may not exist in either directory:

JavaScript
Advertisement