ATTR - Online Linux Manual PageSection : 1
Updated : Extended Attributes
Source : Dec 2001
Note : XFS Compatibility API

NAMEattr − extended attributes on XFS filesystem objects

SYNOPSISattr [ −LRSq ] −s attrname [ −V attrvalue ] pathname attr [ −LRSq ] −g attrname pathname attr [ −LRSq ] −r attrname pathname attr [ −LRSq ] −l pathname

OVERVIEWExtended attributes implement the ability for a user to attach name:value pairs to objects within the XFS filesystem. This document describes the attr command, which is mostly compatible with the IRIX command of the same name. It is thus aimed specifically at users of the XFS filesystem - for filesystem independent extended attribute manipulation, consult the getfattr(1) and setfattr(1) documentation. Extended attributes can be used to store meta-information about the file. For example "character-set=kanji" could tell a document browser to use the Kanji character set when displaying that document and "thumbnail=..." could provide a reduced resolution overview of a high resolution graphic image. In the XFS filesystem, the names can be up to 256 bytes in length, terminated by the first 0 byte. The intent is that they be printable ASCII (or other character set) names for the attribute. The values can be up to 64KB of arbitrary binary data. Attributes can be attached to all types of XFS inodes: regular files, directories, symbolic links, device nodes, etc. XFS uses 2 disjoint attribute name spaces associated with every filesystem object. They are the root and user address spaces. The root address space is accessible only to the superuser, and then only by specifying a flag argument to the function call. Other users will not see or be able to modify attributes in the root address space. The user address space is protected by the normal file permissions mechanism, so the owner of the file can decide who is able to see and/or modify the value of attributes on any particular file.

DESCRIPTIONThe attr utility allows the manipulation of extended attributes associated with filesystem objects from within shell scripts. There are four main operations that attr can perform: GET  The −g attrname option tells attr to search the named object and print (to \f4stdout\fP) the value associated with that attribute name. With the −q flag, \f4stdout\fP will be exactly and only the value of the attribute, suitable for storage directly into a file or processing via a piped command. LIST  The −l option tells attr to list the names of all the attributes that are associated with the object, and the number of bytes in the value of each of those attributes. With the −q flag, \f4stdout\fP will be a simple list of only the attribute names, one per line, suitable for input into a script. REMOVE  The −r attrname option tells attr to remove an attribute with the given name from the object if the attribute exists. There is no output on successful completion. SET/CREATE  The −s attrname option tells attr to set the named attribute of the object to the value read from \f4stdin\fP. If an attribute with that name already exists, its value will be replaced with this one. If an attribute with that name does not already exist, one will be created with this value. With the −V attrvalue flag, the attribute will be set to have a value of attrvalue and \f4stdin\fP will not be read. With the −q flag, \f4stdout\fP will not be used. Without the −q flag, a message showing the attribute name and the entire value will be printed. When the −L option is given and the named object is a symbolic link, operate on the attributes of the object referenced by the symbolic link. Without this option, operate on the attributes of the symbolic link itself. When the −R option is given and the process has appropriate privileges, operate in the root attribute namespace rather that the USER attribute namespace. The −S option is similar, except it specifies use of the security attribute namespace. When the −q option is given attr will try to keep quiet. It will output error messages (to \f4stderr\fP) but will not print status messages (to \f4stdout\fP).

NOTESThe standard file interchange/archive programs tar(1), and cpio(1) will not archive or restore extended attributes, while the xfsdump(8) program will.

CAVEATSThe list option present in the IRIX version of this command is not supported. getfattr provides a mechanism to retrieve all of the attribute names.

AUTHORAndreas Gruenbacher, <andreas.gruenbacher@gmail.com> and the SGI XFS development team, <linux-xfs@oss.sgi.com>. Please send your bug reports or comments to <https://savannah.nongnu.org/bugs/?group=attr> or <acl-devel@nongnu.org>.

SEE ALSOgetfattr(1), setfattr(1), attr_get(3), attr_set(3), attr_multi(3), attr_remove(3), attr(5), xfsdump(8)
0
Johanes Gumabo
Data Size   :   13,639 byte
man-attr.1Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 198,844
Visitor ID   :     :  
Visitor IP   :   3.146.255.161   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (rof_escape_sequence|91|attr.1|104|\f4stdout\fP) the value |to search the named object and print (to \f4stdout\fP) the value )         (rof_escape_sequence|91|attr.1|108|\f4stdout\fP will be exactly and only the value of the attribute, |flag, \f4stdout\fP will be exactly and only the value of the attribute, )         (rof_escape_sequence|91|attr.1|120|\f4stdout\fP will be a simple list of only the attribute names, |flag, \f4stdout\fP will be a simple list of only the attribute names, )         (rof_escape_sequence|91|attr.1|137|\f4stdin\fP. |to set the named attribute of the object to the value read from \f4stdin\fP. )         (rof_escape_sequence|91|attr.1|146|\f4stdin\fP will not be read. |and \f4stdin\fP will not be read. )         (rof_escape_sequence|91|attr.1|149|\f4stdout\fP will not be used. |flag, \f4stdout\fP will not be used. )         (rof_escape_sequence|91|attr.1|181|\f4stderr\fP) |It will output error messages (to \f4stderr\fP) )         (rof_escape_sequence|91|attr.1|182|\f4stdout\fP). |but will not print status messages (to \f4stdout\fP). )