Linux tools for extended attributes

zie extended file attributes - linux

Extended attributes can be accessed and modified using the getfattr and setfattr commands from the attr package on most distributions.[16]
The APIs are called getxattr and setxattr.

cd {directory}
setfattr -n user.genre -v manuals './Onyx-Boox--user-manual.pdf' 
getfattr -d Onyx-Boox--user-manual.pdf 
    ==> user.genre="manuals"

setfattr -n user.genre -v manuals ‘./Onyx-Boox–user-manual.pdf’
=> setfattr: ./Onyx-Boox–user-manual.pdf: Operation not supported

Deze fout kan je ook krijgen als de linux kernel niet gebonden is an xxx
Deze binding is in linux mint reeds het geval

getfattr --help
getfattr 2.4.48 -- get extended attributes
Usage: getfattr [-hRLP] [-n name|-d] [-e en] [-m pattern] path...
  -n, --name=name         get the named extended attribute value
  -d, --dump              get all extended attribute values
  -e, --encoding=...      encode values (as 'text', 'hex' or 'base64')
      --match=pattern     only get attributes with names matching pattern
      --only-values       print the bare values only
  -h, --no-dereference    do not dereference symbolic links
      --absolute-names    don't strip leading '/' in pathnames
  -R, --recursive         recurse into subdirectories
  -L, --logical           logical walk, follow symbolic links
  -P  --physical          physical walk, do not follow symbolic links
      --version           print version and exit
      --help              this help text