1GETFATTR(1) File Utilities GETFATTR(1)
2
3
4
6 getfattr - get extended attributes of filesystem objects
7
9 getfattr [-hRLP] -n name [-e en] pathname...
10 getfattr [-hRLP] -d [-e en] [-m pattern] pathname...
11
13 For each file, getfattr displays the file name, and the set of extended
14 attribute names (and optionally values) which are associated with that
15 file.
16
17 The output format of getfattr -d is as follows:
18 1: # file: somedir/
19 2: user.name0="value0"
20 3: user.name1="value1"
21 4: user.name2="value2"
22 5: ...
23
24 Line 1 identifies the file name for which the following lines are being
25 reported. The remaining lines (lines 2 to 4 above) show the name and
26 value pairs associated with the specified file.
27
29 -n name, --name=name
30 Dump the value of the named extended attribute extended attribute.
31
32 -d, --dump
33 Dump the values of all extended attributes associated with path‐
34 name.
35
36 -e en, --encoding=en
37 Encode values after retrieving them. Valid values of en are
38 "text", "hex", and "base64". Values encoded as text strings are
39 enclosed in double quotes ("), while strings encoded as hexidecimal
40 and base64 are prefixed with 0x and 0s, respectively.
41
42 -h, --no-dereference
43 Do not dereference symlinks. Instead of the file a symlink refers
44 to, the symlink itself is examined.
45
46 -m pattern, --match=pattern
47 Only include attributes with names matching the regular expression
48 pattern. The default value for pattern is "^user\\.", which
49 includes all the attributes in the user namespace. Specify "-" for
50 including all attributes. Refer to attr(5) for a more detailed
51 discussion of namespaces.
52
53 --absolute-names
54 Do not strip leading slash characters ('/'). The default behaviour
55 is to strip leading slash characters.
56
57 --only-values
58 Dump out the extended attribute value(s) only.
59
60 -R, --recursive
61 List the attributes of all files and directories recursively.
62
63 -L, --logical
64 Logical walk, follow symbolic links to directories. The default
65 behaviour is to follow symbolic link arguments, and to skip sym‐
66 bolic links encountered in subdirectories. Only effective in com‐
67 bination with -R.
68
69 -P, --physical
70 Physical walk, do not follow symbolic links to directories. This
71 also skips symbolic link arguments. Only effective in combination
72 with -R.
73
74 --version
75 Print the version of getfattr and exit.
76
77 --help
78 Print help explaining the command line options.
79
80 -- End of command line options. All remaining parameters are inter‐
81 preted as file names, even if they start with a dash character.
82
84 Andreas Gruenbacher, <a.gruenbacher@bestbits.at> and the SGI XFS devel‐
85 opment team, <linux-xfs@oss.sgi.com>.
86
87 Please send your bug reports or comments to these addresses.
88
90 setfattr(1), and attr(5).
91
92
93
94Dec 2001 Extended Attributes GETFATTR(1)