Introduction to attr

The attr package contains utilities to administer the extended attributes on filesystem objects.

This package is known to build and work properly using an LFS-7.4 platform.

Package Information

User Notes:

Installation of attr

Install attr by running the following commands:

sed -i -e 's|/@pkg_name@|&-@pkg_version@|' include/ &&

./configure --prefix=/usr --disable-static &&

There are three sets of tests that come with this package. Issue the following to execute all three: make tests root-tests ext-tests. For meaningful results, the tests need to be carried out on a file system that supports extended attributes.

Now, as the root user:

make install install-dev install-lib &&
chmod -v 755 /usr/lib/ &&
mv -v /usr/lib/* /lib &&
ln -sfv ../../lib/ /usr/lib/

Command Explanations

sed ... include/ This command modifies the documentation directory so that it is a versioned directory.

--disable-static: This switch prevents installation of static versions of the libraries.

Configuring attr

Configuration Information

There is no configuration to attr itself, but to get any use out of attr, a filesystem needs to support extended attributes.

One way to achieve this is to add the user_xattr option to an ext3 filesystem in the /etc/fstab file as shown below:

# file system  mount-point  type   options                 dump  fsck
#                                                                order

/dev/sda1      /            ext3   defaults,acl,user_xattr 0     2


Installed Programs: attr, getfattr, and setfattr
Installed Library:
Installed Directories: /usr/{include/attr,share/doc/attr-2.4.47}

Short Descriptions


extends attributes on filesystem objects.


gets the extended attributes of filesystem objects.


sets the extended attributes of filesystem objects.

contains the attr API functions.

Last updated on 2013-08-22 13:45:41 -0700