Last Updated: February 25, 2016
·
3.382K
· elliottcable

Recursively copying extended attributes on OS X

The most thorough way to copy a directory, especially a sensitive one that exerts your filesystem's abilities to its limits (ex. Backups.backupdb, or ~/Music/iTunes) on Mac OS X.

sudo rsync -Pa -EH /Volumes/Source /Volumes/Destination/

In this command, -P expands to --partial and --progress, and -a (--archive) to --recursive, --links, --perms, --times, --group, --owner, --devices, and --specials. All of the above are documented thoroughly in the rsync manpage.