.TH GETFATTR 1 "Extended Attributes" "Dec 2001" "File Utilities" .SH NAME getfattr, aget \- get extended attributes of filesystem objects .SH SYNOPSIS .nf \f3getfattr\f1 [\f3\-lvR5LP\f1] \f3\-n name\f1 [\f3\-e en\f1] \c \f3pathname\f1... \f3getfattr\f1 [\f3\-lvR5LP\f1] \f3\-d\f1 [\f3\-e en\f1] \c [\f3\-s\f1 | \f3\-r regex\f1] \f3pathname\f1... \f3getfattr\f1 [\f3\-Vh\f1] .fi .SH DESCRIPTION For each file, .B getfattr displays the file name, and the set of extended attribute names (and optionally values) which are associated with that file. .PP .B aget is exactly the same as .BR getfattr , and is installed for compatibility purposes. .PP The output format of .B "getfattr \-ds" is as follows: .fam C .RS .nf 1: # file: somedir/ 2: user.name0="value0" 3: system.name0="value1" 4: user.name1="value2" 5: ... .fi .RE .fam T .PP Line 1 identifies the file name for which the following lines are being reported. The remaining lines (lines 2 to 4 above) show the .I name and .I value pairs associated with the specified file. .SS OPTIONS .TP 4 .I \-n name Dump the value of the named extended attribute extended attribute. .TP .I \-a Absolute names \- suppress the stripping of leading '/' from an absolute .IR pathname . .TP .I \-d Dump the values of all extended attributes associated with .IR pathname . .TP .I \-e en Encode values after retrieving them. Valid values of .I en are "text", "hex", and "base64". .TP .I \-l Do not follow symlinks - if .I pathname is a symbolic link, it is not followed, but is instead itself the inode being examined. .TP .I \-r .I regex is a regular expression pattern to apply to the set of extended attribute names being returned. It defaults to "^user\\." if no .I \-r is specified, which causes .B getfattr to operate on only extended attributes from the user namespace. .TP .I \-s Dump out both the "user" and "system" namespaces. Refer to .BR attr (5) for a more detailed discussion on namespaces. This option is useful for backing up extended attributes in a filesystem independent manner. It is implemented using a regular expression ("^user\\.|^system\\.") and so cannot be used in conjunction with the .I \-r option described earlier. .TP .I \-v Dump out the extended attribute value(s) only. .TP .I \-R Recurse into subdirectories, dumping extended attributes for each file encountered (breadth first). .TP .I \-5 Same as \-R, except done in post-order (depth first). .TP .I \-L Refines the \-R or \-5 option - "logical walk" (do follow symbolic links). .TP .I \-P Refines the \-R or \-5 option - "physical walk" (do not follow symbolic links). .TP .I \-V Print the version of .B getfattr and exit. .TP .I \-h Print help explaining the command line options. .TP .I \-\- End of command line options. All remaining parameters are interpreted as file names, even if they start with a dash character. .SH AUTHOR Andreas Gruenbacher, .RI < a.gruenbacher@computer.org > and the SGI XFS development team, .RI < linux-xfs@oss.sgi.com >. .P Please send your bug reports or comments to these addresses. .SH "SEE ALSO" setfattr(1), and attr(5).