xattr(1)

xattr1

Sets or lists extended attributes on a file or directory

Usage

xattr [-lz] filename [filename ...]

xattr -p [-lz] attr_name filename [filename ...]

xattr -w [-z] attr_name attr_value filename [filename ...]

xattr -d attr_name filename [filename ...]

Overview

This manual page documents briefly the xattr command.

The first form lists the names of all xattrs on the given file(s).
The second form (-p) prints the value of the xattr attr_name.
The third form (-w) sets the value of the xattr attr_name to attr_value.
The fourth form (-d) deletes the xattr attr_name.

Options

A summary of options is included below.

-h

Show summary of options.

-l

Print long format (attr_name: attr_value) when listing xattrs.

-z

Compress or decompress (if compressed) attribute value in zip format.

Examples

xattr -w user.mykey myvalue myfile
xattr -p user.mykey myfile
xattr -d user.mykey myfile

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 3 times.

  1. 6.0
  2. 7–8
  3. 9
  4. 10–13

-z since Debian 7 (Wheezy).

Author

xattr was written by Bob Ippolito <[email protected]>.

This manual page was written by Federico Ceratto, for the Debian project (and may be used by others).

From xattr 0.10.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.