getextattr8
Manipulate extended attributes
Part of rmextattr(8).
Usage
getextattr [-fhqsx]
attrnamespace
attrname
filename ...
lsextattr [-fhq]
attrnamespace
filename ...
rmextattr [-fhq]
attrnamespace
attrname
filename ...
setextattr [-fhnq]
attrnamespace
attrname
attrvalue
filename ...
setextattr -i
[-fhnq]
attrnamespace
attrname
filename ...
Overview
These utilities are user tools to manipulate the named extended attributes on files and directories. 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, filename the name of the target file or directory, attrvalue a string to store in the attribute.
The following options are available:
-
-f -
(Force.) Ignore errors on individual filenames and continue with the remaining arguments.
-
-h -
(No follow.) If the file is a symbolic link, perform the operation on the link itself rather than the file that the link points to.
-
-i -
(From stdin.) Read attribute data from stdin instead of as an argument.
-
-n -
(NUL -terminate.)NUL -terminate the extent content written out.
-
-q -
(Quiet.) Do not print out the pathname and suppress error messages. When given twice, print only the attribute value, with no trailing newline.
-
-s -
(Stringify.) Escape nonprinting characters and put quotes around the output.
-
-x -
(Hex.) Print the output in hexadecimal.
Examples
setextattr system md5 `md5 -q /boot/kernel/kernel` /boot/kernel/kernel md5 -q /boot/kernel/kernel | setextattr -i system md5 /boot/kernel/kernel getextattr system md5 /boot/kernel/kernel getextattr -qq system md5 /boot/kernel/kernel | od -x lsextattr system /boot/kernel/kernel rmextattr system md5 /boot/kernel/kernel
Releases
56 releases since FreeBSD 5.0-RELEASE; the text changed 33 times.
- 5.0
- 5.1–6.3
- 6.4
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
- 8.4
- 9.0
- 9.1
- 9.2
- 9.3
- 10.0
- 10.1
- 10.2
- 10.3
- 10.4
- 11.0
- 11.1
- 11.2
- 11.3
- 11.4
- 12.0
- 12.1
- 12.2
- 12.3
- 12.4
- 13.0–13.2
- 13.3–16.0
-i since FreeBSD 10.4-RELEASE.