xattr use
I need guidance on using the xattr command.
The following single line command was issued in a terminal window in the folder containing the files to be operated on:
xattr -w com.apple.metadata:kMDItemFinderComment "<comment text>" DSC*.*
No errors were received.
ls -l@ reports the kMDItemFinderComment attribute is present for all the files. (It did not prior to the xattr command.)
Issuing the command mdls on any of the files and reviewing the comments in the finder does not show the <comment text>.
Executing the xattr command entering the attribute value (string) without the quote symbols or spaces results in the string being reported for the kMDItemFinderComment using mdls in a terminal window, but it fails to show in finder using 'Get Info'.
So I believe I have two pertinent questions:
1) How to write a string with spaces to an attribute value using xattr.
2) What is required when writing an attribute value using xattr such that it is reported by both the mdls command in a terminal window and also by finder using 'Get info'?
Appreciate the help,
Lance
Mac Pro