How to interpret extended attributes on MacOS X?

1

I have a problem with rsync (version 2.6.9 which is outdated, but this is another problem) not correctly synchronizing files from MacOS X to MacOS X (versions Mountain Lion, Mavericks, Yosemite and that's all for now because my time to investigate is exhausted). I have been able to reduce this problem to files which have extended attributes. I would like to understand it (for example is it safe to suppress x or y extended attributes).

On Mac OS X, ls with the @l option combination displays extended attributes of any argument:

% ls -@dl example
dr-xr-xr-x@ 2 bob  wheel  102 Jul 18 17:21 example
        com.apple.FinderInfo     32 
%

The command xattr displays the content of these extended attributes:

% xattr -l example
com.apple.FinderInfo:
00000000  3F 3F 3F 3F 3F 3F 3F 3F 20 02 00 00 00 00 00 00  |???????? .......|
00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000020
%

How may I decode this information, in this particular case, and in a more general one?

What might have created this com.apple.FinderInfo extended attribute?

dan

Posted 2016-07-18T16:33:46.003

Reputation: 247

According to this article, the com.apple.FinderInfo attribute is something that Apple built into Finder and its own filesystem, for its own use. In general, though, extended attributes are freeform; any application can attach its own extended attribute whose value has an arbitrary format. This makes generalized decoding harder, especially since extended attributes are not yet commonly used.

– Castaglia – 2016-07-18T17:17:36.400

@castaglia: thanks. Your comment is pretty good an answer. – dan – 2016-07-19T12:55:58.773

Answers

0

According to this article, the com.apple.FinderInfo attribute is something that Apple built into Finder and its own filesystem, for its own use. In general, though, extended attributes are freeform; any application can attach its own extended attribute whose value has an arbitrary format. This makes generalized decoding harder, especially since extended attributes are not yet commonly used.

Another resource which attempts to list common extended attributes and their value formats is FreeDesktop's "Common Extended Attributes"

Castaglia

Posted 2016-07-18T16:33:46.003

Reputation: 257