MainspringGuides › Compare folders
macOS Guide

How to Compare Two Folders on Mac

Updated July 2026 · 3 min read

Two copies of a project folder, months apart — which files changed? A backup and its source — did everything really copy? Finder has no compare command, but macOS ships a perfectly good one in Terminal, and for ongoing syncing there are free visual tools. Here is the quick way, the thorough way, and the sanity check in between.

The quick answer: diff -rq

The diff command compares files; with -r it recurses into folders and with -q it reports which files differ rather than every changed line. Drag each folder into the Terminal window to avoid typing paths:

# list every difference between two folders
diff -rq /path/to/FolderA /path/to/FolderB

# same, ignoring Finder's metadata files
diff -rq -x .DS_Store /path/to/FolderA /path/to/FolderB

The output has exactly two kinds of line, and reading them is the whole skill:

No output at all means the folders' contents match. diff only reads — it changes nothing, so there is nothing to undo. On big folders give it time; it is comparing every byte. The -x .DS_Store exclusion matters because Finder scatters those metadata files around, and they will otherwise pollute the report with differences you do not care about.

The 10-second sanity check: Get Info

Before reaching for Terminal, sometimes you only need "are these plausibly the same?" Select the first folder, press Cmd+I, and note the size and item count on the Size line; repeat for the second. Matching counts and sizes do not prove the folders are identical — a changed file can keep its size — but mismatched numbers prove they differ, and the item counts tell you which side is missing things. It is triage, not verification.

Preview a sync with rsync

If the real question is "what would I need to copy to make B match A?", rsync in dry-run mode answers it without touching anything:

# -n = dry run: show what WOULD be copied, change nothing
rsync -avn /path/to/FolderA/ /path/to/FolderB/

# when the list looks right, run it for real (omit the n)
rsync -av /path/to/FolderA/ /path/to/FolderB/

The trailing slashes matter — they mean "the contents of" rather than the folder itself. The dry run is the undo-proof step; review it before running the real copy, and be deliberate before adding --delete (which removes extra files in the destination and has no undo).

Visual tools for regular comparing

For recurring jobs — mirroring a work folder to a USB drive, reconciling two photo dumps — a visual tool beats rereading diff output. FreeFileSync (free, open source) shows both folders side by side, colors the differences, and lets you sync in either direction with a click. If you have Xcode installed you already own FileMerge: run opendiff FolderA FolderB in Terminal for Apple's own side-by-side folder view. Developers comparing text-heavy folders should also consider git diff --no-index FolderA FolderB, which produces beautifully readable line-level output with zero setup beyond having git.

Keep your Mac's setup tidy too

Comparing folders is a Terminal job; tuning macOS shouldn't be. Mainspring turns 90+ hidden Mac settings into labelled, reversible one-click toggles — no commands to remember.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once

Found the differences — now merge them

Dragging one folder onto another in Finder replaces rather than merges, which catches everyone at least once. Before you combine the two copies, read how to merge folders on a Mac safely.