Syncing Directories Between Mac and Windows

From Littledamien Wiki
Jump to navigation Jump to search


Mac[edit]

$ cd path/to/parent/of/directory/to/be/synced/
$ rsync -a /Volumes/share/path/to/src/ src

The -a flag is recursive, and it preserves permissions.

To preview the operation, use the -n (dry-run) and -v (verbose) flags:

$ rsync -anv /Volumes/share/path/to/src/ src

Note that the trailing slash on the source path is important. With the slash the contents of the path are synced into the target directory. Without the slash the source directory itself is placed inside the target directory.[1]

Notes[edit]