Skip to content

Instantly share code, notes, and snippets.

@StudioEtrange
Last active February 2, 2019 10:05
Show Gist options
  • Save StudioEtrange/0b758d07a74ebaab94f8546d9dfe971c to your computer and use it in GitHub Desktop.
Save StudioEtrange/0b758d07a74ebaab94f8546d9dfe971c to your computer and use it in GitHub Desktop.
Copy preserve attributes
Copy FOLDER_1 into PATH_B and preserve all attributes
sudo rsync -avihXP --info=progress2 --stats /PATH_A/FOLDER_1/ /PATH_B/
* use --dry-run to test
* for encoding char problems between Mac/Linux : https://serverfault.com/questions/638316/rsync-iconv-option-on-mac-not-working-sync-from-remote-linux-server-to-local
** rsync initiated from Mac : --iconv=utf-8-mac,utf-8
** rsync initiated from Linux : --iconv=utf-8,utf-8-mac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment