4 ms·
It's a matter of defaults, and no choice of default will work for everybody. I agree that "rsync --archive" ought to preserve extended attributes, same with cr
by zeroimpl 3y ago
It's a matter of defaults, and no choice of default will work for everybody.
I agree that "rsync --archive" ought to preserve extended attributes, same with creating a tarball. But when copying a file, as opposed to creating a backup/archive, I don't think extended attributes should be included by default.
And yes I've also had to compile custom versions of rsync at one point to get a version which understood extended attributes on Mac, but I think that's mostly standardized now.
EDIT: Also most programs don't even preserve permissions/ACLs on copy, so not sure why they'd preserve attributes by default.
- adrian_b 3y agoMost copy programs do not preserve much or all metadata by default because this was the original behavior of the UNIX cp command, which copied only the file data, but none of the metadata, except the file name, when it was not specified for the destination. The first time when I have used cp, more than thirty years ago, it was a shock for me to discover that this is the default behavior, because it is not something that I can associate with a command named "copy". Since that day and until today, I always alias the various copy commands like cp or rsync to include all the necessary options for making perfect copies. I have never needed to use them with different options, which would make imperfect copies, but there have been countless situations when my usage would have been broken by lossy copies.