GETEXTATTR(8) OpenBSD System Manager's Manual GETEXTATTR(8)
getextattr - retrieve a named extended attribute
getextattr [-ls] attrnamespace attrname filename ...
getextattr is a user tool to retrieve a named extended attribute on a
file or directory. The attrnamespace argument should be the namespace of
the attribute to retrieve: legal values are "user" and "system". The
attrname argument should be the name of the attribute, and filename a
list of files and directories from which to retrieve attribute data.
The following options are available:
-l Print attributes in the first column and file names in the sec-
ond. Can be used only in conjunction with the -s option.
-s Attempt to display the attribute data as a string, although the
results may not look pretty if the data is binary data. The
strvisx(3) function is used to generate the string, so control
sequences should be safely escaped. Otherwise, the attribute da-
ta will be represented as a series of two-digit hex numbers.
In order for getextattr to succeed, the attribute service must be avail-
able on the file system, and the attribute must be defined for the file
# getextattr system md5 /bsd
61 61 33 62 39 39 66 65 31 35 35 32 31 62 65 32
62 36 38 36 62 31 66 39 63 64 33 39 35 36 36 31
# getextattr -s system md5 /bsd
Retrieve the ``md5'' extended attribute for the file /bsd.
extattr(2), extattr(3), extattrctl(8), setextattr(8), extattr(9)
Extended attribute support was developed as part of the TrustedBSD Pro-
ject. It was developed to support security extensions requiring addi-
tional labels to be associated with each file or directory.
Robert N M Watson
The output format for this utility is ugly, and worse yet, not very use-
OpenBSD 3.6 March 30, 2000 1