Apply ASLR to attr
[platform/upstream/attr.git] / man / man1 / getfattr.1
1 .\" Copyright (C) 2002, 2004, 2007  Silicon Graphics, Inc. All rights reserved.
2 .\" Copyright (C) 2002, 2004, 2007  Andreas Gruenbacher <agruen@suse.de>
3 .\"
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual.  If not, see
21 .\" <http://www.gnu.org/licenses/>.
22 .\"
23 .TH GETFATTR 1 "Extended Attributes" "Dec 2001" "File Utilities"
24 .SH NAME
25 getfattr \- get extended attributes of filesystem objects
26 .SH SYNOPSIS
27 .nf
28 \f3getfattr\f1 [\f3\-hRLP\f1] \f3\-n name\f1 [\f3\-e en\f1] \c
29 \f3pathname\f1...
30 \f3getfattr\f1 [\f3\-hRLP\f1] \f3\-d\f1 [\f3\-e en\f1] \c
31 [\f3\-m pattern\f1] \f3pathname\f1...
32 .fi
33 .SH DESCRIPTION
34 For each file,
35 .B getfattr
36 displays the file name,
37 and the set of extended attribute names (and optionally values) which
38 are associated with that file.
39 .PP
40 The output format of
41 .B "getfattr \-d"
42 is as follows:
43 .fam C
44 .RS
45 .nf
46  1:  # file: somedir/
47  2:  user.name0="value0"
48  3:  user.name1="value1"
49  4:  user.name2="value2"
50  5:  ...
51 .fi
52 .RE
53 .fam T
54 .PP
55 Line 1 identifies the file name for which the
56 following lines are being reported.
57 The remaining lines (lines 2 to 4 above) show the
58 .I name
59 and 
60 .I value
61 pairs associated with the specified file.
62 .SH OPTIONS
63 .TP 4
64 .BR \-n " \f2name\f1, " \-\-name "=\f2name\f1"
65 Dump the value of the named extended attribute extended attribute.
66 .TP
67 .BR \-d ", " \-\-dump
68 Dump the values of all extended attributes associated with
69 .IR pathname .
70 .TP
71 .BR \-e " \f2en\f1, " \-\-encoding "=\f2en\f1"
72 Encode values after retrieving them.
73 Valid values of
74 .I en
75 are "text", "hex", and "base64".
76 Values encoded as text strings are enclosed in double quotes ("),
77 while strings encoded as hexidecimal and base64 are prefixed with
78 0x and 0s, respectively.
79 .TP
80 .BR \-h ", " \-\-no-dereference
81 Do not dereference symlinks. Instead of the file a symlink refers to, the
82 symlink itself is examined.  Unless doing a logical (\-L) traversal, do not
83 traverse symlinks to directories.
84 .TP
85 .BR \-m " \f2pattern\f1, " \-\-match "=\f2pattern\f1"
86 Only include attributes with names matching the regular expression
87 .IR pattern .
88 The default value for
89 .I pattern
90 is "^user\\\\.", 
91 which includes all the attributes in the user namespace. Specify "\-" for
92 including all attributes.  Refer to
93 .BR attr (5)
94 for a more detailed discussion of namespaces.
95 .TP
96 .B \-\-absolute-names
97 Do not strip leading slash characters ('/').
98 The default behaviour is to strip leading slash characters.
99 .TP
100 .B \-\-only-values
101 Dump out the raw extended attribute value(s) without encoding them.
102 .TP
103 .BR \-R ", " \-\-recursive
104 List the attributes of all files and directories recursively.
105 .TP
106 .BR \-L ", " \-\-logical
107 Logical walk, follow symbolic links to directories.
108 The default behaviour is to follow symbolic link arguments unless
109 \-\-no\-dereference is given, and to skip symbolic links encountered in
110 subdirectories.
111 Only effective in combination with \-R.
112 .TP
113 .BR \-P ", " \-\-physical
114 Physical walk, do not follow symbolic links to directories.
115 This also skips symbolic link arguments.
116 Only effective in combination with \-R.
117 .TP
118 .B \-\-version
119 Print the version of
120 .B getfattr
121 and exit.
122 .TP
123 .B \-\-help
124 Print help explaining the command line options.
125 .TP
126 .B \-\-
127 End of command line options.
128 All remaining parameters are interpreted as file names, even if they
129 start with a dash character.
130 .SH AUTHOR
131 Andreas Gruenbacher,
132 .RI < a.gruenbacher@bestbits.at >
133 and the SGI XFS development team,
134 .RI < linux-xfs@oss.sgi.com >.
135 .P
136 Please send your bug reports or comments to these addresses.
137 .SH "SEE ALSO"
138 setfattr(1), and attr(5).