Friday, 7 June 2013

How to copy file from PC to Mac, while preserving xattrs on the target file?

How to copy file from PC to Mac, while preserving xattrs on the target file?

I've a file M on my Mac (OS X ML 10.8.4) and file P on my PC (Win7). File P was originally a copy of file M but is now slightly updated. File M has some extended attributes.
How can I copy file P onto file M, while preserving the extended attributes on file M?
Generally if I copy-paste P onto M through network share, the extended attributes on M are lost.
I'm looking for a an easily implementable / scalable way. cat P > M is not really an option (not even sure if that works). Could rsync help here?

No comments:

Post a Comment