How to compare two folders on a Mac
Updated 11 November 2026
The usual reason to compare two folders is a backup you are not sure about: a project folder on your Mac and its copy on a NAS or external drive, and the question "what is missing from the backup?". Finder has no command for this. macOS has two Terminal tools that do it well, and they are free.
Before you start: drag the folders into Terminal
Open Terminal (Applications > Utilities). In each command below, type the command, then drag the first folder from Finder into the Terminal window and the second after it; Terminal fills in the full paths, spaces and all. A NAS share needs to be mounted in Finder first, so it appears under /Volumes.
1. List what differs with diff
diff -rq ~/Projects/Show-2026 /Volumes/Backup/Show-2026
-r goes into subfolders and -q prints one line per difference instead of the contents. You get two kinds of line:
Only in /Users/you/Projects/Show-2026/audio: take-03.wavmeans the backup is missing that file.Files ... and ... differmeans both sides have it but the contents are not the same.
No output means the folders match. diff reads every byte on both sides, which is the most thorough check but slow for a large folder on a NAS, because the whole backup comes back over the network.
2. Ask rsync what it would copy, without copying
A dry run of rsync is faster on big folders, because by default it compares each file's size and modified date instead of reading the contents.
rsync -rvn --delete ~/Projects/Show-2026/ /Volumes/Backup/Show-2026/
-nis the dry run: nothing is copied or deleted. Do not leave it out, especially with--delete.- Each file it lists is one the backup is missing, or has with a different size or date.
- Lines starting
deletingare files that exist only in the backup. Nothing is deleted on a dry run;--deleteis there only to make rsync report them. - Keep the trailing
/on both paths, or rsync compares the folder itself rather than its contents.
Add -c to compare full checksums instead of size and date: as slow as diff, but certain. If every file shows as different on a NAS, the share is probably storing modified times less precisely than your Mac does; --modify-window=2 treats dates within two seconds as equal. Since macOS 15 the built-in rsync is Apple's openrsync, which supports all of these options.
3. A quick look in Finder
For a small folder, open both in Finder in list view, sort each by name and turn on the Size column, or press ⌘J and select Calculate all sizes. Matching file counts and totals are a reasonable sign, not proof: a missing file and an extra file cancel out, and it tells you nothing about the contents.
Doing it in Harbour
Harbour has this built in. Open the two folders in its two panes and choose Go > Compare with Other Pane. It works on any two folders, on the same drive or not, including a Mac folder against its NAS backup.
- Rows are lined up by path, and each is marked missing on one side, only on one side, or different, with the newer date in bold. Files that match are hidden unless you ask to see them.
- Matching uses path, size and modified date, so it stays quick on a NAS. Verify contents… hashes both sides when you want certainty.
- An arrow on each row copies that item across. Copy all missing works in either direction, and Newer wins lists what it will replace and asks first.
- A replaced file is moved to the Bin, or the NAS share's #recycle folder, before the new copy goes in, so Undo puts it back. On a share with no recycle folder Harbour asks before replacing it permanently.
- Compare never deletes anything from either side, and a folder it could not read is shown as "couldn't read", never as missing.
For checking a copy you have already made, see how to check a copy matches the original. Harbour compares and copies; it does not keep two folders in sync on its own. If you need two-way sync or remote servers, ForkLift and Path Finder do that.
Sources
Checked 11 November 2026.
- diff manual: diff(1)
- openrsync manual (macOS): openrsync(1), for
-n,-c,--deleteand--modify-window; background: Michael Tsai on rsync in macOS 15 - Apple: Terminal User Guide