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
28 OPTIONS
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 follow symlinks. If pathname is a symbolic link, the sym‐
44 bolic link itself is examined, rather than the file the link refers
45 to.
46
47 -m pattern, --match=pattern
48 Only include attributes with names matching the regular expression
49 pattern. The default value for pattern is "^user\\.", -m which
50 includes all the attributes in the user namespace. Refer to
51 attr(5) for a more detailed discussion on 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. The default behaviour is to
65 follow symbolic link arguments, and to skip symbolic links encoun‐
66 tered in subdirectories.
67
68 -P, --physical
69 Physical walk, skip all symbolic links. This also skips symbolic
70 link arguments.
71
72 --version
73 Print the version of getfattr and exit.
74
75 --help
76 Print help explaining the command line options.
77
78 -- End of command line options. All remaining parameters are inter‐
79 preted as file names, even if they start with a dash character.
80
82 Andreas Gruenbacher, <a.gruenbacher@bestbits.at> and the SGI XFS devel‐
83 opment team, <linux-xfs@oss.sgi.com>.
84
85 Please send your bug reports or comments to these addresses.
86
88 setfattr(1), and attr(5).
89
90
91
92Dec 2001 Extended Attributes GETFATTR(1)