xattr(1) | xattr(1) |
xattr - Manipulate the extended attributes of files.
xattr | [-sl] | <path...> | ||||
xattr | -p | [-sl] | name | <path...> | ||
xattr | -d | [-sl] | name | <path...> | ||
xattr | -w | [-slRC] | name value | <path...> |
With the xattr command, the extended attributes of one or more files may be listed, written (set), printed (displayed), or deleted.
Extended attributes allow the arbitrary association of name:data pairs with file system objects (file, directories, symbolic links, et cetera). The name of an extended attribute may be any null-terminated UTF-8 string. The data associated with it may be either textual or binary.
This implimentation of the xattr command is designed to be backwards-compatible with the python script that shipped as /usr/bin/xattr with Macintosh OS 10.5.0 (Leopard). The display format has been changed slightly for use in shell scripts.
By default, xattr lists the extended attributes associate with the file object at the specified path. Alternate behavior is triggered by the use of a command flag.
default | List the extended attributes of the given file objects. | |
-p | Display (print) the value of a given extended attribute for each file object. | |
-d | Delete an existing extended attribute from all of the file objects. | |
-w | Set (write) a given extended attribute of the file objects to a given value. | |
-v | Display version information. | |
-h | Display help. |
-s | Do not follow symbolic links. | |
-l | Display results in extended format. | |
-R | Expect to edit existing extended attributes; fail rather than create a new one. | |
-C | Expect to create new extended attributes; fail rather than edit an existing one. |
/usr/local/bin/xattr | the xattr executable. |
/usr/share/man/xattr.1 | this page. |
svn co https://xattr.svn.sourceforge.net/svnroot/xattr xattr | access via subversion. |
http://sourceforge.net/projects/xattr | the xattr package at Sourceforge (depreciated method). |