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 second.
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 data
will be represented as a series of two-digit hex
numbers.
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
queried.
# getextattr system md5 /bsd
/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
/bsd: "aa3b99fe15521be2b686b1f9cd395661"
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 Project.
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 ] |