1removexattr(2) System Calls Manual removexattr(2)
2
3
4
6 removexattr, lremovexattr, fremovexattr - remove an extended attribute
7
9 Standard C library (libc, -lc)
10
12 #include <sys/xattr.h>
13
14 int removexattr(const char *path, const char *name);
15 int lremovexattr(const char *path, const char *name);
16 int fremovexattr(int fd, const char *name);
17
19 Extended attributes are name:value pairs associated with inodes (files,
20 directories, symbolic links, etc.). They are extensions to the normal
21 attributes which are associated with all inodes in the system (i.e.,
22 the stat(2) data). A complete overview of extended attributes concepts
23 can be found in xattr(7).
24
25 removexattr() removes the extended attribute identified by name and as‐
26 sociated with the given path in the filesystem.
27
28 lremovexattr() is identical to removexattr(), except in the case of a
29 symbolic link, where the extended attribute is removed from the link
30 itself, not the file that it refers to.
31
32 fremovexattr() is identical to removexattr(), only the extended attri‐
33 bute is removed from the open file referred to by fd (as returned by
34 open(2)) in place of path.
35
36 An extended attribute name is a null-terminated string. The name in‐
37 cludes a namespace prefix; there may be several, disjoint namespaces
38 associated with an individual inode.
39
41 On success, zero is returned. On failure, -1 is returned and errno is
42 set to indicate the error.
43
45 ENODATA
46 The named attribute does not exist.
47
48 ENOTSUP
49 Extended attributes are not supported by the filesystem, or are
50 disabled.
51
52 In addition, the errors documented in stat(2) can also occur.
53
55 Linux.
56
58 Linux 2.4, glibc 2.3.
59
61 getfattr(1), setfattr(1), getxattr(2), listxattr(2), open(2), setx‐
62 attr(2), stat(2), symlink(7), xattr(7)
63
64
65
66Linux man-pages 6.05 2023-04-08 removexattr(2)