I have a file with a comment as extended attribute. This is how
I can see the attribute from the Terminal:
mdls -name kMDItemFinderComment path_to_file
I get the answer
kMDItemFinderComment = "my_comment"
To copy this file to new_location while preserving this comment, I type
cp -p path_to_file new_location
Everything seems to work as typing
mdls -name kMDItemFinderComment new_location
returns
kMDItemFinderComment = "my_comment"
My problem arises when I access the copied file at the new_location from a Finder window. I click on Get Info but the Comments section is empty. After this action, when I try again
mdls -name kMDItemFinderComment new_location
I get
kMDItemFinderComment = (null)
Can anyone help me?
PS: should I use xattr?