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.
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. Unless doing a logical (-L)
45 traversal, do not traverse symlinks to directories.
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\\.", which
50 includes all the attributes in the user namespace. Specify "-" for
51 including all attributes. Refer to attr(5) for a more detailed
52 discussion of namespaces.
53
54 --absolute-names
55 Do not strip leading slash characters ('/'). The default behaviour
56 is to strip leading slash characters.
57
58 --only-values
59 Dump out the raw extended attribute value(s) without encoding them.
60
61 -R, --recursive
62 List the attributes of all files and directories recursively.
63
64 -L, --logical
65 Logical walk, follow symbolic links to directories. The default
66 behaviour is to follow symbolic link arguments unless --no-derefer‐
67 ence is given, and to skip symbolic links encountered in subdirec‐
68 tories. Only effective in combination with -R.
69
70 -P, --physical
71 Physical walk, do not follow symbolic links to directories. This
72 also skips symbolic link arguments. Only effective in combination
73 with -R.
74
75 --version
76 Print the version of getfattr and exit.
77
78 --help
79 Print help explaining the command line options.
80
81 -- End of command line options. All remaining parameters are inter‐
82 preted as file names, even if they start with a dash character.
83
85 Andreas Gruenbacher, <a.gruenbacher@bestbits.at> and the SGI XFS devel‐
86 opment team, <linux-xfs@oss.sgi.com>.
87
88 Please send your bug reports or comments to these addresses.
89
91 setfattr(1), and attr(5).
92
93
94
95Dec 2001 Extended Attributes GETFATTR(1)