Like most other modern filesystems the HFS filesystem on OS X supports extended attributes and OS X access control lists ACL,
Files on OS X using the systems standard HFS file system consists of parts:
Payload data
The actual data
Extended Attributes
like icons
Finder meta-file
color tags, description

Transfer OS X extended attributes: AppleSingle and AppleDouble formats

The OX on board Unix commands like cp copy the OS X extended attributes when the target system supports it.
For user uses like the tar archiver Apple has developed a format to store the extended attributes in a separate file. AppleSingle' combined both file forks and the related Finder meta-file information into a single file, whereas 'AppleDouble stored them as two separate files.

Commands that work with OS X extended attributes

Unix-ls command

To list extended attributes from the command line specify the @-switch with the Unix Unix-ls command:
 ls -l@ *
 -rw-r--r--@ 1 ckent  staff  225868823 Sep  9  2012 Myfile01.flv 42 41338


The xattr command displays and manipulates extended attributes on OS X.
 xattr -l  MyMovie.flv
 00000000  00 00 00 00 00 00 00 00 04 08 00 00 00 00 00 00  |................|
 00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|

tar command

The Unix-tar archiver command stores OS X extended attributes in a separate file in AppleDouble format.
 time ( tar cvf -  .  |( cd /Volumes/UserHDA/ahaack/; tar xvf - )) 2> /tmp/kenterr.log

Status: Published Date: 2014-10-15 00:23:19 +0200 (Mi, 15 Okt 2014) Revision: 27

Copyright bei Andreas Haack (C) 2014. Diese Seite wird so wie sie ist zur Verfuegung gestellt, ohne irgenweche Garantien der Verwendbarkeit fuer bestimte Zwecke. Die auf dieser Seiten angebrachten Links liegen ausserhalb der redaktionellen Verantwortung von Andreas Haack und es wird keine Haftung oder Garantie uebernommen. Die Seiten sind Copyright (c) 2014 von Andreas Haack. Kein Teil darf ohne die schriftliche Einverstaendnis von Andreas Haack veroeffentlicht werden.
The page is provided 'as is' , without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fit- ness for a particular purpose and non-infringement. In no event shall Andreas Haack be liable for any claim, damages or other liability. This page is copyrighted property of Andreas Haack. Copyright by Andreas Haack (c) 2014 . No part of this page may be published without written permission for Andreas Haack. A hyper-link may created to this page but NOT to the embedded elements of this page. It may be freely downloaded for private purpose only as long as it is unaltered.