How to compare two folders on a Mac
Finder can't compare folders. How to find what differs with diff in Terminal, FileMerge or an app, and how to copy only the changes safely.

In short
- Finder has no command to compare two folders. The quickest built-in way is Terminal:
diff -rq FolderA FolderB. - FileMerge, which comes with Xcode, compares two folders side by side in a window.
- To copy only what changed, preview with
rsync -nfirst, or use an app that compares and syncs with a confirmation.
To compare two folders on a Mac, open Terminal and run diff -rq followed by the two folder paths. It lists every file that is only in one folder and every file whose contents differ, including files in subfolders. Finder has no compare command, so for a window instead of text you need FileMerge (part of Xcode) or a folder comparison app. The commands below were run on macOS 27.0 on 30 November 2026.
Can Finder compare two folders?
No. Finder can show two folders at once, but it doesn't mark which files differ. The closest you get by hand is two windows in List view, sorted by name, with the Size and Date Modified columns showing (two folders side by side on a Mac shows how). That works for a dozen files and misses changes inside subfolders. For anything bigger, use one of the methods below.
Compare two folders in Terminal with diff
The diff command that ships with macOS compares whole folder trees. The -r option goes into subfolders, and -q ("Just print a line when the files differ", from man diff) gives a short list instead of every changed line.
- Open Terminal (Applications ▸ Utilities).
- Type
diff -rqwith a space at the end. - Drag the first folder from Finder into the Terminal window, then the second. Terminal fills in both paths.
- Press Return.
The output has two kinds of lines:
| Line | Meaning |
|---|---|
Only in A: notes.txt | The file or folder exists in folder A only (for a subfolder, the path shows where). |
Files A/report.pdf and B/report.pdf differ | Both folders have the file, and the contents are not the same. |
Files that are the same in both folders aren't listed. If nothing prints, the two folders match. diff compares contents byte by byte, so it reads every file of the same name; on a large folder or a network share this takes a while.
Compare folders in a window with FileMerge
FileMerge is Apple's visual comparison tool. Its manual page says "opendiff and FileMerge are installed as part of the Xcode Developer Tools", so you need Xcode from the App Store first. Then:
- In Terminal, run
opendiff FolderA FolderB(drag the folders in, as above). - FileMerge opens and compares the two folders in a window.
- Open a text file from the list to see its changed lines side by side.
FileMerge is made for source code and text. It can merge two text files into a third, but it doesn't copy files between your two folders. Xcode is also a large download for this one tool.
Copy only what changed: rsync dry run
When the goal is to bring a backup up to date, rsync can show the differences and then copy them. Always run it with -n (dry run, "Do not actually modify the destination") first.
- Preview:
rsync -ain Source/ Backup/. Each line is something rsync would copy:>f+++++++ notes.txtis a new file,>f.s.....a file whose size differs.cd+++++++ newdir/is a new folder. - If the list is right, run it without
n:rsync -ai Source/ Backup/.
Keep the trailing slashes, or rsync copies the Source folder itself into Backup. By default rsync decides by size and modification time, not by contents. Files that are only in Backup are left alone; the --delete option removes them, deletes for good and skips the Trash, so leave it out unless you are sure. On macOS 27 the rsync command is openrsync, compatible with rsync 2.6.9.
Other apps that compare folders on a Mac
Several apps do folder comparison as their main job, and some are free. If comparing and syncing folders is most of what you need, one of these may be the better choice than a file manager.
| App | Compares folders | Copies or syncs changes | Price model | macOS |
|---|---|---|---|---|
| VisualDiffer | Yes, side by side with color-coded status | Not stated on their site | Free, open source (GPL3) | 13 or later |
| FreeFileSync | Yes | Yes: Mirror, Two way and Update modes | Free and open source; a paid Business Edition for commercial use | Not stated as a minimum |
| Kaleidoscope | Yes, also text and images | Copies items from one side to the other | Subscription, 7-day free trial | 15 (Sequoia) or later |
| Beyond Compare | Yes, also text, images and tables | Yes, Folder Sync | License, free trial | Not stated as a minimum |
Checked 30 November 2026 on visualdiffer.com, freefilesync.org (home page and FAQ), kaleidoscope.app and scootersoftware.com.
Which way should you compare folders?
| Method | Shows | Copies changes | Needs |
|---|---|---|---|
| Two Finder windows | What you spot by eye | By hand | Nothing |
diff -rq | Files only on one side, files with different contents | No | Terminal |
| FileMerge | The same, in a window, plus line-by-line text changes | No | Xcode |
rsync -n | What would be copied, by size and date | Yes, one way, after the preview | Terminal |
| A folder comparison app | Differences in a list, with filters | Yes, often both ways, with a confirmation | An app |
Compare Folders in FileOctopus
FileOctopus is our app. It works like Finder and has a Compare Folders window: select two folders and choose File → Compare Folders…, or right-click the background of a pane and choose Compare with Other Pane. Reading the folders never changes them.
- Differences in one list. Filters show All Differences, Only in each folder, Newer, Different and Can't Sync, each with a count. When nothing differs, the window says These folders match.
- Size and date, or contents. By default files count as the same when their size matches and their dates are less than 2 seconds apart. Compare contents also reads files of the same size, which is slower.
- One way or both ways. The direction control has →, ← and ⇄ (Both Ways), and each row's Action chip says what a sync will do. In Both Ways, a newer item never replaces the other one until you choose it on its row.
- Nothing changes until you confirm. Sync N Items… opens a confirmation that lists what will happen. Replaced items go to the Trash first, and Edit → Undo Sync puts everything back until FileOctopus quits.
- Speed. On a Mac mini M4 it compared 100,000 items per side by size and date in 1.9 s (warm cache, internal SSD, 2026-10-30).
Keep in mind
- Compare Folders needs the 14-day trial or PRO; on Free, its commands explain that and no folder is read. See pricing.
- Dates that differ by exactly one hour on FAT and exFAT drives (after a daylight-saving change) show as Newer. Turn on Compare contents for those.
- Sync never downloads cloud-only files; they show Not Downloaded. On a disk without a Trash, such as a network share, a replaced item can't be put back.
Every option is in the Compare Folders guide, and the compare tip has a short clip.
Questions people ask
How do I compare the contents of two folders on a Mac?
Run diff -rq FolderA FolderB in Terminal. It compares the files byte by byte and lists the ones that differ and the ones that exist in only one folder. FileMerge (opendiff FolderA FolderB) shows the same in a window if Xcode is installed.
How do I compare only the file names in two folders?
Run diff <(cd FolderA && find . | sort) <(cd FolderB && find . | sort) in Terminal. Lines starting with < are only in FolderA, lines with > only in FolderB. It doesn't read the files, so it is fast on big folders.
How do I sync two folders on a Mac?
macOS has no built-in folder sync between two local folders. Preview with rsync -ain Source/ Destination/, then run it without n; or use a folder comparison app that shows the changes and asks before copying.
What if the two folders have the same name?
Then you may want to merge them instead. Finder can merge folders with the same name, with limits; see how to merge two folders on a Mac.
Want to see what differs between two folders and copy only the changes, with Undo? Download FileOctopus; the 14-day trial includes Compare Folders and needs no card or account. More free and built-in options are in the best Finder alternatives.
Sources
Checked on 30 November 2026: the vendors' own sites for the apps in the table; the diff, rsync (openrsync) and opendiff manual pages on macOS 27.0, with the commands above run on throwaway test folders. FileOctopus facts are from our Compare Folders guide, the limits page and the Compare Folders benchmark (Mac mini M4, 16 GB, macOS 27.0, 2026-10-30). The cover shows the Terminal icon from macOS 27.0 and the FileMerge icon from Xcode.


