This module allows you to manage extended attributes on files or directories
salt '*' xattr.list /path/to/file
Causes the all attributes on the file/directory to be removed
path (str) -- The file(s) to get attributes from
True if successful, otherwise False
CommandExecutionError on file not found or any other unknown error
CLI Example:
salt '*' xattr.delete /path/to/file "com.test.attr"
Removes the given attribute from the file
True if successful, otherwise False
CommandExecutionError on file not found, attribute not found, and any other unknown error
CLI Example:
salt '*' xattr.delete /path/to/file "com.test.attr"
List all of the extended attributes on the given file/directory
A dictionary containing extended attributes and values for the given file
CommandExecutionError on file not found or any other unknown error
CLI Example:
salt '*' xattr.list /path/to/file
salt '*' xattr.list /path/to/file hex=True
Read the given attributes on the given file/directory
A string containing the value of the named attribute
CommandExecutionError on file not found, attribute not found, and any other unknown error
CLI Example:
salt '*' xattr.read /path/to/file com.test.attr
salt '*' xattr.read /path/to/file com.test.attr hex=True
Causes the given attribute name to be assigned the given value
True if successful, otherwise False
CommandExecutionError on file not found or any other unknown error
CLI Example:
salt '*' xattr.write /path/to/file "com.test.attr" "value"