xattr -w Writing metadata to a file - syntax issue

861 views Asked by At

Testing the ability to write metadata to files in Mac OSX. Any help would be appreciated as I know little about unix syntax.

In Terminal. Why does this work;

xattr -w com.apple.metadata:kMDItemDescription 'Somedescription' /somePath/someFile.pdf

but this does not;

xattr -w com.apple.metadata:kMDItemDescription 'Some\ description' /somePath/someFile.pdf

Obviously I will sometimes need to write to the metadata tag as a string that includes spaces. I would have thought that escaping the whitespace would work.

0

There are 0 answers