1REMOVEXATTR(2)             Linux Programmer's Manual            REMOVEXATTR(2)
2
3
4

NAME

6       removexattr, lremovexattr, fremovexattr - remove an extended attribute
7

SYNOPSIS

9       #include <sys/xattr.h>
10
11       int removexattr(const char *path, const char *name);
12       int lremovexattr(const char *path, const char *name);
13       int fremovexattr(int fd, const char *name);
14

DESCRIPTION

16       Extended attributes are name:value pairs associated with inodes (files,
17       directories, symbolic links, etc.).  They are extensions to the  normal
18       attributes  which  are  associated with all inodes in the system (i.e.,
19       the stat(2) data).  A complete overview of extended attributes concepts
20       can be found in xattr(7).
21
22       removexattr() removes the extended attribute identified by name and as‐
23       sociated with the given path in the filesystem.
24
25       lremovexattr() is identical to removexattr(), except in the case  of  a
26       symbolic  link,  where  the extended attribute is removed from the link
27       itself, not the file that it refers to.
28
29       fremovexattr() is identical to removexattr(), only the extended  attri‐
30       bute  is  removed  from the open file referred to by fd (as returned by
31       open(2)) in place of path.
32
33       An extended attribute name is a null-terminated string.  The  name  in‐
34       cludes  a  namespace  prefix; there may be several, disjoint namespaces
35       associated with an individual inode.
36

RETURN VALUE

38       On success, zero is returned.  On failure, -1 is returned and errno  is
39       set to indicate the error.
40

ERRORS

42       ENODATA
43              The named attribute does not exist.
44
45       ENOTSUP
46              Extended  attributes are not supported by the filesystem, or are
47              disabled.
48
49       In addition, the errors documented in stat(2) can also occur.
50

VERSIONS

52       These system calls have been available on Linux since kernel 2.4; glibc
53       support is provided since version 2.3.
54

CONFORMING TO

56       These system calls are Linux-specific.
57

SEE ALSO

59       getfattr(1),  setfattr(1),  getxattr(2),  listxattr(2),  open(2), setx‐
60       attr(2), stat(2), symlink(7), xattr(7)
61

COLOPHON

63       This page is part of release 5.12 of the Linux  man-pages  project.   A
64       description  of  the project, information about reporting bugs, and the
65       latest    version    of    this    page,    can     be     found     at
66       https://www.kernel.org/doc/man-pages/.
67
68
69
70Linux                             2021-03-22                    REMOVEXATTR(2)
Impressum