GETEXTATTR(1) | General Commands Manual | GETEXTATTR(1) |
getextattr
,
lsextattr
, rmextattr
,
setextattr
— manipulate
extended attributes
getextattr |
[-fhq ] [-s |
-x | -v
style] [namespace]
attrname filename ... |
lsextattr |
[-fhq ] namespace
filename ... |
rmextattr |
[-fhq ] [namespace]
attrname filename ... |
setextattr |
[-fhnq ] [namespace]
attrname attrvalue
filename ... |
setextattr |
[-fhnq ] -i
valuefile [namespace]
attrname filename ... |
These utilities are user tools to manipulate the named extended attributes on files and directories.
The namespace argument should be the
namespace of the attribute to retrieve: legal values are
user
and system
. For all
operations except lsextattr
, the namespace argument
may be omitted if the attribute name is namespace prefixed, like in
user.test
. In that later case, the
user
namespace prefix obviously selects
user
namespace. system
,
security
, and trusted
namespace prefixes select the system
namespace.
The attrname argument should be the name of the attribute, filename the name of the target file or directory, attrvalue a string to store in the attribute.
The following options are available:
-f
-h
-i
valuefile-n
NUL
-terminate.)
NUL
-terminate the extent content written out.-q
-s
-v
stylevis
-c
.vis
-h
.vis
-o
.-x
setextattr system md5 `md5 -q /boot/kernel/kernel` /boot/kernel/kernel getextattr system md5 /boot/kernel/kernel lsextattr system /boot/kernel/kernel rmextattr system md5 /boot/kernel/kernel
Examples omitting namespace (and attribute value) argument:
setextattr -i valuefile trusted.gfid /export/wd3a getextattr -x trusted.gfid /export/wd3a
Extended attribute support was developed as part of the TrustedBSD Project, and introduced in FreeBSD 5.0 and NetBSD 3.0. It was developed to support security extensions requiring additional labels to be associated with each file or directory.
Extended attribute support was resurrected and made more usable in NetBSD 5.2.
Robert N M Watson
Poul-Henning Kamp
Emmanuel Dreyfus
January 2, 2005 | NetBSD 10.99 |