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
the attribute to retrieve: legal values are "user" and "system". The
attrname argument should be the name of the attribute, and
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 second.
Can be used only in conjunction with the -s
-s Attempt to display the attribute data as a string,
results may not look pretty if the data is binary
strvisx(3) function is used to generate the string,
sequences should be safely escaped. Otherwise, the
will be represented as a series of two-digit hex
In order for getextattr to succeed, the attribute service
must be available
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
It was developed to support security extensions requiring additional
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 useful.
OpenBSD 3.6 March 30, 2000
[ Back ]