getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value
#include <sys/types.h> #include <attr/xattr.h> ssize_t getxattr (const char *path, const char *name, void *value, size_t size); ssize_t lgetxattr (const char *path, const char *name, void *value, size_t size); ssize_t fgetxattr (int filedes, const char *name, void *value, size_t size);
Extended attributes are name:value pairs associated with inodes (files, directories, symlinks, etc). They are extensions to the normal attributes which are associated with all inodes in the system (i.e. the stat(2) data). A complete overview of extended attributes concepts can be found in attr(5). getxattr retrieves the value of the extended attribute identified by name and associated with the given path in the filesystem. The length of the attribute value is returned. lgetxattr is identical to getxattr, except in the case of a symbolic link, where the link itself is interrogated, not the file that it refers to. fgetxattr is identical to getxattr, only the open file pointed to by filedes (as returned by open(2)) is interrogated in place of path. An extended attribute name is a simple NULL-terminated string. The name includes a namespace prefix - there may be several, disjoint namespaces associated with an individual inode. The value of an extended attribute is a chunk of arbitrary textual or binary data of specified length. An empty buffer of size zero can be passed into these calls to return the current size of the named extended attribute, which can be used to estimate the size of a buffer which is sufficiently large to hold the value associated with the extended attribute. The interface is designed to allow guessing of initial buffer sizes, and to enlarge buffers when the return value indicates that the buffer provided was too small.
On success, a positive number is returned indicating the size of the extended attribute value. On failure, -1 is returned and errno is set appropriately. If the named attribute does not exist, or the process has no access to this attribute, errno is set to ENOATTR. If the size of the value buffer is too small to hold the result, errno is set to ERANGE. If extended attributes are not supported by the filesystem, or are disabled, errno is set to ENOTSUP. The errors documented for the stat(2) system call are also applicable here.
Andreas Gruenbacher, <email@example.com> and the SGI XFS development team, <firstname.lastname@example.org>. Please send any bug reports or comments to these addresses.
getfattr(1), setfattr(1), open(2), stat(2), setxattr(2), listxattr(2), removexattr(2), and attr(5).
More Linux Commands
Locale::Maketext::Guts(3pm) - Deprecated module to load Loca
Previously Local::Maketext::GutsLoader performed some magic to load Locale::Maketext when utf8 was unavailable. The subs this module provided were merged back i
gnutls_certificate_set_openpgp_keyring_file.3 - The function is used to set keyrings that will be used internally by various OpenPGP functions. For example to f
ldap_add_ext(3) - Perform an LDAP add operation (Man Page)
The ldap_add_ext_s() routine is used to perform an LDAP add operation. It takes dn, the DN of the entry to add, and attrs, a null-terminated array of the entrys
rt_sigtimedwait(2) - synchronously wait for queued signals
RETURN VALUE ERRORS CONFORMING TO NOTES SEE ALSO COLOPHON NAME rt_sigtimedwait - synchronously wait for queued signals SYNOPSIS long rt_sigtimedwait(const sigse
gnutls_x509_crt_sign2(3) - API function - Linux manual page
gnutls_x509_crt_sign2.3 - This function will sign the certificate with the issuers private key, and will copy the issuers information into the certificate. This
llrintf(3) - round to nearest integer - Linux manual page...
These functions round their argument to the nearest integer value, using the current rounding direction (see fesetround(3)). Note that unlike the rint(3) family
btrfs-receive(8) receive subvolumes from stdin file.........
Receives one or more subvolumes that were previously sent with btrfs send. The received subvolumes are stored into <mount>. btrfs receive will fail with the fol
gnutls_pcert_import_x509_raw(3) - API function (Man Page)...
gnutls_pcert_import_x509_raw.3 - This convenience function will import the given certificate to a gnutls_pcert_st structure. The structure must be deinitialized
free_field(3form) - create and destroy form fields (ManPage)
The function new_field allocates a new field and initializes it from the parameters given: height, width, row of upper-left corner, column of upper-left corner,
glob(7) - Globbing pathnames (Misc - Linux man page)........
Long ago, in UNIX V6, there was a program /etc/glob that would expand wildcard patterns. Soon afterward this became a shell built-in. These days there is also a
glTexCoord2f(3gl) - set the current texture coordinates.....
glTexCoord specifies texture coordinates in one, two, three, or four dimensions. glTexCoord1 sets the current texture coordinates to (s, 0, 0, 1); a call to glT
send_trap_vars(3) - send TRAPs or INFORMs from a Net-SNMP MI
These three routines may be used to send traps from a MIB module within the Net-SNMP agent (including an AgentX subagent). send_easy_trap() sends an SNMPv1 trap