Skip to main content
2 of 2
I highlight this is a most portable solution. I added examples of other useful command options. I added an example to avoid a common unuseful output.

Built-in utility for macOS and Linux

If you don't mind using the terminal, the diff command can compare directories.
This utility is also available in most Linux distributions.

diff -rq directory1/ directory2/

-r indicates recurse through subdirectories, and -q gives brief output (i.e. don't show the actual diffs, just note what files/dirs are different).

Other useful options are:
-s report identical files,
-i ignore case in file contents,
--ignore-file-name-case ignore case when comparing file names.

If you want to avoid warnings (mostly usefulness warnings) about differences in the .DS_Store files, then use:

diff -rq directory1/ directory2/ | grep -v .DS_Store
Adam Parkin
  • 1.6k
  • 1
  • 10
  • 10