XATTR(1)
β¨ XATTR β¨
okay bestie so this is the xattr manual page β a whole little command for setting or listing extended attributes on a file or directory. yes. that's the whole vibe. let's get into it π
πΈ SYNOPSIS πΈ
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 ... ]
four forms, four moods, all iconic π
π¦ DESCRIPTION π¦
So this page documents the xattr command briefly β that's literally what it says, not me being lazy, okay? π
Anyway here's the tea, form by form:
- 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.
that's it. that's the whole flow. no cap β¨
π OPTIONS π
A summary of options is included below. bestie we LOVE a summary π«Ά
-hβ Show summary of options. tiny help menu moment.-lβ Print long format (attr_name: attr_value) when listing xattrs. so you get the receipts, not just the names π-zβ Compress or decompress (if compressed) attribute value in zip format. little zip-zip situation π§
π₯ EXAMPLES π₯
here's what it actually looks like in the wild, copy-paste core:
xattr -w user.mykey myvalue myfile
xattr -p user.mykey myfile
xattr -d user.mykey myfile
set it, peek at it, delete it. the whole arc in three commands πβ¨
π SEE ALSO π
The Python module "xattr" β yeah there's a whole Python side to this too, iykyk π
π AUTHOR π
xattr was written by Bob Ippolito <bob@redivi.com>. legend behaviour, honestly.
This manual page was written by Federico Ceratto, for the Debian project (and may be used by others). queen shit π
okay and the cute lil sign-off at the bottom: this page lives in the General Commands Manual, it's version/datestamp May 8, 2010, and it goes by XATTR(1). periodt π π
go forth and set some attributes, bestie π¦
π¦ where this page comes from
- debian bookworm: xattr 0.10.1-1 Β· MIT OR PSF
- debian trixie: xattr 0.10.1-1 Β· MIT OR PSF
- ubuntu jammy: xattr 0.9.7-1build4 Β· MIT OR PSF
- ubuntu noble: xattr 0.10.1-1build1 Β· MIT OR PSF
- ubuntu questing: xattr 0.10.1-1build1
- ubuntu resolute: xattr 1.3.0-1 Β· MIT OR PSF
- ubuntu stonking: xattr 1.3.0-1 Β· MIT OR PSF
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms