Custom File Attribute (xattr)
The ext4 filesystem supports extended attributes, which are name-value pairs that can be associated with a file. - chatGPT
If you need to move files with xattr between filesystems (e.g., from ZFS to ext4), you may encounter compatibility issues. Use tools like tar or rsync with –xattrs to preserve attributes.
Notes
Custom attribute are of the form user.tag
and the prefix user
is not customizable, only the tag
part, eg trying to set:
xattr -w blake3.h 1234 src/blake3.rb
=> [Errno 95] Operation not supportedxattr -w user.blake3 1234 src/blake3.rb
=> works fine
Lang support
- Ruby - ffi-xattr - unmaintained
Written on January 11, 2025, Last update on
filesystem
file
ext4
zfs