Problem with file attributes using cp -Rp
While executing
cp -Rp /Users/xxxx/Directory_Name /Volumes/Backup/Directory_Name
where xxxx represents my user-name and same thing for Directory_Name and File_name
I got the following error message
cp: fchflags: /Volumes/Backup/Directory_Name/File_Name.txt: Invalid argument
So I looked at the attributes. Nothing for the standard ones but something for the extended ones obtained with xattr -l
Source:
xattr -l File_Name.txt
com.apple.TextEncoding: utf-8;134217984
com.apple.lastuseddate#PS: ??'e
com.apple.macl:
com.apple.metadata:kMDLabel_w3vm6mn2ztywmrwdcjm6otzsxm: ??^<`??~/?LT??)??$??m??????u?z%ڀS?̕m??3Ym|?HЦ??+?ƌʎ?++*uf?a0
Destination
xattr -l File_Name.txt
com.apple.TextEncoding: utf-8;134217984
com.apple.lastuseddate#PS: ??'e
com.apple.macl:
?ƌʎ?++*uf?a0tadata:kMDLabel_w3vm6mn2ztywmrwdcjm6otzsxm: ??^<`??~/?LT??)??$??m??????u?z%ڀS?̕m??3Ym|?HЦ??+??k}???
So it appears in the last line that
com.apple.me
has been changed into
?ƌʎ?++*uf?a0
I suspect some character encoding is malfunctioning.
Any idea on how to solve the problem ?
Some extra data
System version : macOS 12.7.6 (21H1320)
Kernel version : Darwin 21.6.0
External drive
Type de volume : Unknown
Nœud d’appareil BSD : disk5s1
File system : ExFAT
Connexion : USB