Skip to main content
formatting
Source Link
toxefa
  • 436
  • 3
  • 10

If you want to preserve file attributes, symbolic links, and recursive structure, rsync should suffice:

rsync -a ~/somefolder /Volumes/SomeUSB/

The -a (archive) flag is a shortcut for the following rsync options:

--recursive recurse into directories
--links copy symlinks as symlinks
--perms preserve permissions
--times preserve times
--group sets the group of the destination file to be the same as the source file
--owner sets the owner of the destination file to be the same as the source file (if you're copying to a remote system, the remote SSH user will need to have superuser status for this) 
--devices rsync will transfer character and block device files to the remote system.

If you want to preserve file attributes, symbolic links, and recursive structure, rsync should suffice:

rsync -a ~/somefolder /Volumes/SomeUSB/

The -a (archive) flag is a shortcut for the following rsync options:

--recursive recurse into directories
--links copy symlinks as symlinks
--perms preserve permissions
--times preserve times
--group sets the group of the destination file to be the same as the source file
--owner sets the owner of the destination file to be the same as the source file (if you're copying to a remote system, the remote SSH user will need to have superuser status for this) --devices rsync will transfer character and block device files to the remote system.

If you want to preserve file attributes, symbolic links, and recursive structure, rsync should suffice:

rsync -a ~/somefolder /Volumes/SomeUSB/

The -a (archive) flag is a shortcut for the following rsync options:

--recursive recurse into directories
--links copy symlinks as symlinks
--perms preserve permissions
--times preserve times
--group sets the group of the destination file to be the same as the source file
--owner sets the owner of the destination file to be the same as the source file (if you're copying to a remote system, the remote SSH user will need to have superuser status for this) 
--devices rsync will transfer character and block device files to the remote system.

Source Link
toxefa
  • 436
  • 3
  • 10

If you want to preserve file attributes, symbolic links, and recursive structure, rsync should suffice:

rsync -a ~/somefolder /Volumes/SomeUSB/

The -a (archive) flag is a shortcut for the following rsync options:

--recursive recurse into directories
--links copy symlinks as symlinks
--perms preserve permissions
--times preserve times
--group sets the group of the destination file to be the same as the source file
--owner sets the owner of the destination file to be the same as the source file (if you're copying to a remote system, the remote SSH user will need to have superuser status for this) --devices rsync will transfer character and block device files to the remote system.