How to Compare Two Folders on a Mac and See What's Different

The Finder can't compare two folders. When you have copied a folder to an external disk, a NAS or a cloud and want to know whether the copy is complete, or you have two versions of a project and want to see what changed, a Mac gives you three ways to do it: the diff command in Terminal, Apple's FileMerge app (it comes with Xcode), or a file manager with a compare tool, such as Folia Files. All three list the files that exist in only one folder and the files that exist in both but differ.
Why the Finder can't tell you
The closest the Finder gets is Get Info (⌘I) on each folder, which shows its size and number of items. Matching numbers suggest the folders are the same, but they don't prove it: a file can change without changing size, like a text file where one letter was corrected. And if the numbers differ, Get Info doesn't say which files are missing. The only other way is to open both folders side by side and check the names one by one.
Compare two folders in Terminal with diff
macOS includes the diff command, and with two options it compares whole folders:
diff -rq ~/Pictures/Iceland /Volumes/Backup/Iceland
-r goes into every subfolder, and -q only reports which files differ instead of printing what changed inside each one. To avoid typing paths, type diff -rq , then drag each folder from the Finder into the Terminal window.
The answer has two kinds of lines:
Files /Users/alex/Pictures/Iceland/IMG_4021.jpg and /Volumes/Backup/Iceland/IMG_4021.jpg differ
Only in /Users/alex/Pictures/Iceland: IMG_4048.jpg
Only in names a file or a folder that exists on one side only (for a folder, its contents are not listed). Files … differ means the file is in both places, under the same name and path, with different contents. If diff prints nothing, both folders hold the same files with the same contents.
A few things to know:
diffreads the files to compare them. That makes it exact (dates don't matter), but slow on a large photo or video library, or on a network drive.- The Finder's hidden
.DS_Storefiles often differ between two copies. Leave them out with-x .DS_Store. - To check the names only, without reading any file (fast, even on a slow disk), compare the two lists of files:
diff <(cd ~/Pictures/Iceland && find . | sort) <(cd /Volumes/Backup/Iceland && find . | sort)
Lines that start with < exist only in the first folder, lines that start with > only in the second.
Compare folders with FileMerge
FileMerge is Apple's own comparison app. It is free, but it comes with Xcode, Apple's developer tool, a large download from the Mac App Store; the smaller Command Line Tools don't include it. Once Xcode is installed:
- Open FileMerge from Xcode's menu, Xcode › Open Developer Tool › FileMerge, or type
opendifffollowed by the two folders in Terminal. - Choose a left folder and a right folder, then click Compare.
FileMerge lists the files of both folders: identical files appear in gray, files that differ or exist on one side only in black. Double-click a file to see its two versions line by line. It is made for source code: for text files it shows exactly what changed, but for photos, videos or PDFs it can only tell you that they differ.
Compare two folders in Folia Files
Folia Files has a Compare tool that shows the result as a sortable table and copies what's missing in either direction. It is in both editions, the website one and the Mac App Store one.
- Open the two folders in two panes, side by side (how to view two folders side by side on a Mac). This step is optional, but the Compare tool starts with the folders of the first two panes.
- Choose Tools › Compare… (⇧⌘K), or click Tools in the toolbar, then Compare. The tool opens in a tab.
- Check the Left and Right folders. Choose… picks another one; the arrows between them swap the two.
- Click Compare.

Every file gets one of four statuses:
- Different: in both folders, but not the same;
- Left only and Right only: missing from the other folder;
- Identical: the same in both folders.
The buttons above the list count the files of each status and filter the list. Identical files are hidden at first, so what you see is what needs your attention; click Identical to show them too. The Left, Modified (Left), Right and Modified (Right) columns give the size and date on each side, so you can tell which copy is newer.

Fast or exact
By default, Folia Files doesn't read the files: two files are Identical when they have the same size and the same modification date, to within two seconds. That is fast, even for thousands of photos.
Turn on Compare contents (slower, exact) when the dates can't be trusted. A copy that didn't keep the original dates (made with cp without -p, or downloaded again from a cloud's website, for example) makes every file look Different. With this option, files of the same size are compared by their SHA-256 fingerprint and the dates are ignored. Files of different sizes are always Different.
A few more rules:
- A subfolder that exists on both sides is not listed itself: its files are, with their path inside the folder.
- A folder that exists on one side only is listed once, as Folder, without its contents.
- Hidden files are left out unless you check Hidden files, and the Finder's
.DS_Storefiles are always ignored. - Files are matched by their path. A file renamed in one folder appears twice: Left only under one name, Right only under the other.
Copy what's missing
Select rows (⌘-click or ⇧-click to select several) and click Copy Selection to Right → or ← To Left at the bottom of the tool. The same commands are in the right-click menu (Copy to Right →, ← Copy to Left), next to Show Left in Folia Files and Show Right in Folia Files, which take you to that file in the active pane.
- Missing subfolders are created on the other side.
- If the file is already there (a Different file), Folia Files asks what to do. Keep Both is the default; If Newer replaces it only if the copied file is newer; Replace sends the old version to the Trash once the new one is fully copied; Skip leaves it alone.
- When the copy is done, the comparison runs again. Copied files keep their modification dates, so they usually become Identical and leave the list. The copies are recorded in the Operations history, like any other copy.
See what changed inside a file
Double-click a Different file, or right-click it and choose Show Differences. The tool switches to its Files view and shows the two versions of a text file side by side, line by line: removed lines in red, added lines in green, with the number of lines added and removed. For other files, such as photos or PDFs, it says whether they are identical, with their sizes.
Which one to use
- A quick, exact check if you're at ease in Terminal:
diff -rq. - Two versions of code or text files, if you have Xcode: FileMerge.
- Checking that a copy or a backup is complete and fixing it on the spot, especially with photos and documents: the Compare tool of Folia Files.
If you find yourself copying the same differences across every week, a sync does it for you: see how to keep two folders in sync on a Mac. And for the copies you make from now on, Folia Files can check each file as it copies it: turn on Settings › Files and Network › Verify every file copied to another disk (read back and compared, slower).


