How to sync two folders on a Mac

To make one folder an exact copy of another, run rsync -a --delete Source/ Destination/ in Terminal, after checking the plan with a dry run (-n). Mind the slash after the source, and know that --delete deletes files from the destination permanently. To only add and update files, leave out --delete and add -u. For two-way sync, or a preview that sends removed files to the Trash, use a sync app.

Updated · commands run on macOS 27.2

One-way: make a folder an exact copy

macOS includes rsync. -a copies folders recursively and keeps dates and permissions, -i prints one line per change, and --delete removes files from the destination that aren’t in the source.

--delete deletes permanently. Files it removes don’t go to the Trash. Run the dry run first, every time, and double-check which folder is the source.

  1. Open Terminal from Applications › Utilities.
  2. Run rsync -ain --delete --exclude .DS_Store Photos/ Backup/. The -n makes it a dry run: it lists what it would do and changes nothing.
  3. Lines starting with *deleting are files that will be deleted from the destination for good, not moved to the Trash. Stop here if any of them matter.
  4. Run the same command without n: rsync -a --delete --exclude .DS_Store Photos/ Backup/.
  5. Run the dry run again. No output means the destination now matches the source.
rsync -ain --delete --exclude .DS_Store Photos/ Backup/
*deleting old/export.jpg
*deleting old/
>f.s..... notes.txt
>f+++++++ 2026-03/IMG_0302.HEIC

Reading the dry run

Line starts withMeaning
*deletingWill be deleted from the destination (permanently).
>f+++++++A new file will be copied.
>f.s.....The file exists on both sides, the size differs, so it will be copied over the destination’s copy.
cd+++++++A new folder will be created.

Without -i, -v prints plain names and a summary. This is rsync -avn --delete Photos/ Backup/ on the same folders:

Transfer starting: 6 files
deleting old/export.jpg
deleting old/
.DS_Store
notes.txt
2026-03/IMG_0302.HEIC

sent 281 bytes  received 38 bytes  290000 bytes/sec
total size is 11  speedup is 0.03

The trailing slash matters

Photos/ means “the contents of Photos”. Without the slash, rsync copies the folder itself into the destination, so you end up with Backup/Photos/…. Here is rsync -ain Photos Backup/:

cd+++++++ Photos/
>f+++++++ Photos/.DS_Store
>f+++++++ Photos/notes.txt
cd+++++++ Photos/2026-03/
>f+++++++ Photos/2026-03/IMG_0301.HEIC
>f+++++++ Photos/2026-03/IMG_0302.HEIC

A copy in the wrong place is easy to miss on a big folder, and it doubles the space used. Another reason to read the dry run before every real run.

Only add and update, never delete

Leave out --delete, and add -u so a file that is newer in the destination isn’t overwritten. In this test the destination’s notes.txt was newer, so it was left alone:

rsync -ainu Photos/ Backup/
>f+++++++ .DS_Store
>f+++++++ 2026-03/IMG_0302.HEIC

Two-way sync

rsync copies in one direction. Running it both ways can’t tell “deleted on the left” from “new on the right”, and if both copies of a file changed, the newer one simply wins and the other edit is gone. Doing this safely takes a record of what both folders looked like after the last sync.

Sync with FolderTwin

FolderTwin compares first and shows the plan: how many files it will copy and replace, and what goes to the Trash. Pick a mode per pair:

  • Mirror: the right folder becomes an exact copy of the left; extras on the right go to the Trash.
  • Update: new and changed files go left to right; nothing is removed, and a newer file on the right is left alone.
  • Two-way: changes go both ways. FolderTwin remembers the last sync, so a deletion on one side goes to the Trash on the other, and a file changed on both sides is kept twice, the older copy renamed “name (conflict YYYY-MM-DD HHmm).ext”.

Whatever a sync removes or replaces goes to the Trash. A file that changed after the compare is skipped, and symbolic links are never followed.

Questions

Is rsync on a Mac the same as on Linux?

Not quite. Recent macOS versions ship openrsync; rsync --version on our Mac printed “openrsync: protocol version 29, rsync version 2.6.9 compatible”. The common options on this page (-a, -n, -i, -u, --delete, --exclude) work the same.

Does rsync --delete move files to the Trash?

No. It deletes them permanently. Always run the dry run with -n first and read the *deleting lines.

Can rsync sync two folders both ways?

Not safely on its own. Running it in both directions can’t tell a file you deleted on one side from a new file on the other, so deleted files come back, or new ones get deleted with --delete. Two-way sync needs a record of the last sync.

Does iCloud Drive do this?

iCloud Drive keeps folders in step between your devices through iCloud. It doesn’t sync a folder to an external drive or to another folder on the same Mac.

What’s the difference between Mirror and Update in FolderTwin?

Mirror makes the right folder an exact copy of the left and moves extras on the right to the Trash. Update only copies new and changed files to the right and never removes anything.

Sources

  • rsync(1) manual page (openrsync) — man rsync in Terminal

More guides

FolderTwin for Mac

Compare two folders, see every difference, and sync only what you approve. Removed files go to the Trash.

Coming soon to the Mac App Store

macOS 14 Sonoma or later · Apple silicon and Intel