commands.sh

setfattr

linux

Set extended file attributes.

More info →

Options (3)

-n, --nameboolean

Set name of attribute for file

Example: setfattr {{[-n|--name]}} user.{{attribute_name}} {{path/to/file}}
-v, --valueboolean

Set a user-defined value of an extended attribute on a file

Example: setfattr {{[-n|--name]}} user.{{attribute_name}} {{[-v|--value]}} "{{value}}" {{path/to/file}}
-x, --removeboolean

Remove a specific attribute of a file

Example: setfattr {{[-x|--remove]}} user.{{attribute_name}} {{path/to/file}}

Examples (3)

Set name of attribute for file

setfattr [-n|--name] user.attribute_name path/to/file

Set a user-defined value of an extended attribute on a file

setfattr [-n|--name] user.attribute_name [-v|--value] "value" path/to/file

Remove a specific attribute of a file

setfattr [-x|--remove] user.attribute_name path/to/file
made by @shridhargupta | data from tldr-pages