Guides · Updated October 2026

How to compare two folders on a Mac

You copied a folder to a backup drive, or you have two versions of a project and don’t know which is newer. The Finder can’t tell you what’s different. Here are the free ways that can, from a quick sanity check to an exact list.

Short answer: for a list of every difference, run diff -rq on the two folders in Terminal. To see what a copy would change before you make it, use rsync with -n (dry run). Both come with macOS.

What the Finder can tell you

Select each folder and press Command-I. Get Info shows how many items it holds and its size. If both match, the copy is probably complete. If they don’t, it doesn’t prove much:

  • Compare the exact byte count (“1,234,567,890 bytes”), not the rounded figure or the “on disk” size, which depends on how the drive is formatted.
  • Small differences often come from hidden files such as .DS_Store, which the Finder creates in folders you open.

To find out which files differ, you need one of the tools below.

List the differences with diff

Open Terminal (Applications > Utilities). Type diff -rq , then drag the first folder into the window, then the second, and press Return:

diff -rq ~/Pictures/Export /Volumes/Backup/Export
  • -r goes into every subfolder.
  • -q only reports whether files differ, instead of printing every changed line.

The output has two kinds of lines:

Only in /Volumes/Backup/Export: IMG_0042.jpg
Files /Users/you/Pictures/Export/notes.txt and /Volumes/Backup/Export/notes.txt differ

No output means the folders are identical. diff compares file contents, not dates, so it’s thorough; on large folders it reads a lot of data and takes as long as your slowest drive needs. To skip the Finder’s hidden files, save the result, or count it:

diff -rq FolderA FolderB | grep -v '\.DS_Store'
diff -rq FolderA FolderB > ~/Desktop/differences.txt
diff -rq FolderA FolderB | wc -l

Preview a copy with rsync

rsync is a copying tool, but with -n it only reports what it would do. That makes it a good way to see what’s missing from a backup:

rsync -avun --delete ~/Pictures/Export/ /Volumes/Backup/Export/

What each flag does:

  • -a (archive): goes into subfolders and compares modification times, permissions and symbolic links as well as names.
  • -v (verbose): lists every file it would copy.
  • -u (update): skips files that are newer on the right side. Leave it out if you want those listed too.
  • -n (dry run): changes nothing. Keep it until you’ve read the output.
  • --delete: also lists files that exist only on the right, as “deleting …”. With -n, nothing is deleted.

By default rsync treats files with the same size and modification time as identical, which is fast. Add -c to compare contents instead, which reads every file.

The trailing-slash trap

The slash at the end of the first folder changes the meaning:

  • rsync -avun Export/ Backup/Export/ compares the contents of Export with the contents of Backup/Export. This is almost always what you want.
  • rsync -avun Export Backup/Export/ (no slash after the first) means “the Export folder itself, inside Backup/Export”, so it compares against Backup/Export/Export. That doesn’t exist, so every file shows as new. Run for real, it would put a second copy one level down.

Put a slash after both folders when you mean “these two should match”.

Then copy, carefully

Once the list looks right, run it again without -n to copy. Leave out --delete unless you really want files removed from the right side: rsync deletes immediately, not to the Trash.

rsync -av ~/Pictures/Export/ /Volumes/Backup/Export/

macOS 14 includes rsync 2.6.9. From macOS 15.4, Apple ships openrsync under the same name, which supports the common options. If your version rejects one, brew install rsync installs the current release. rsync --version tells you which you have.

FileMerge, if you have Xcode

FileMerge is Apple’s comparison app. It comes with Xcode, which is free in the Mac App Store but a download of several gigabytes. With Xcode installed, open it from Xcode > Open Developer Tool > FileMerge, or from Terminal:

opendiff ~/Pictures/Export /Volumes/Backup/Export

It lists files that differ or exist on one side only, and double-clicking a text file shows the two versions side by side, with tools to merge them. It’s built for source code: it doesn’t copy files between the folders, and for photos or other binary files it can only tell you they differ.

The faster way: Lockstep

Lockstep app icon

If you check backups or sync folders by hand regularly, Lockstep puts all of this in one window. It scans both folders at once, ignores .DS_Store and similar noise, shows every difference with its status, and copies what’s missing in either direction after showing you exactly what it will do. It never deletes anything: replaced files go to the Trash. Comparing is free for good; copying is $15 after a 14-day trial.

Download Free Trial About Lockstep