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
17 OPTIONS
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. See also 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 --version
47 Print the version of setfattr and exit.
48
49 --help
50 Print help explaining the command line options.
51
52 -- End of command line options. All remaining parameters are inter‐
53 preted as file names, even if they start with a dash character.
54
56 Andreas Gruenbacher, <a.gruenbacher@bestbits.at> and the SGI XFS devel‐
57 opment team, <linux-xfs@oss.sgi.com>.
58
59 Please send your bug reports or comments to these addresses.
60
62 getfattr(1), and attr(5).
63
64
65
66Dec 2001 Extended Attributes SETFATTR(1)