1SETFATTR(1) File Utilities SETFATTR(1)
2
3
4
6 setfattr - set extended attributes of filesystem objects
7
9 setfattr [-h] -n name [-v value] pathname...
10 setfattr [-h] -x name pathname...
11 setfattr [-h] --restore=file
12
14 The setfattr command associates a new value with an extended attribute
15 name for each specified file.
16
18 -n name, --name=name
19 Specifies the name of the extended attribute to set.
20
21 -v value, --value=value
22 Specifies the new value of the extended attribute. There are three
23 methods available for encoding the value. If the given string is
24 enclosed in double quotes, the inner string is treated as text. In
25 that case, backslashes and double quotes have special meanings and
26 need to be escaped by a preceding backslash. Any control characters
27 can be encoded as a backslash followed by three digits as its ASCII
28 code in octal. If the given string begins with 0x or 0X, it
29 expresses a hexadecimal number. If the given string begins with 0s
30 or 0S, base64 encoding is expected. Also see the --encoding option
31 of getfattr(1).
32
33 -x name, --remove=name
34 Remove the named extended attribute entirely.
35
36 -h, --no-dereference
37 Do not follow symlinks. If pathname is a symbolic link, it is not
38 followed, but is instead itself the inode being modified.
39
40 --restore=file
41 Restores extended attributes from file. The file must be in the
42 format generated by the getfattr command with the --dump option.
43 If a dash (-) is given as the file name, setfattr reads from stan‐
44 dard input.
45
46 --raw
47 Do not decode the attribute value. Can be used to set values
48 obtained with getfattr --only-values.
49
50 --version
51 Print the version of setfattr and exit.
52
53 --help
54 Print help explaining the command line options.
55
56 -- End of command line options. All remaining parameters are inter‐
57 preted as file names, even if they start with a dash character.
58
60 Andreas Gruenbacher, <a.gruenbacher@bestbits.at> and the SGI XFS devel‐
61 opment team, <linux-xfs@oss.sgi.com>.
62
63 Please send your bug reports or comments to these addresses.
64
66 getfattr(1), and attr(5).
67
68
69
70Dec 2001 Extended Attributes SETFATTR(1)