Debian Codegraph @

upstream/debian-unstable/man2/removexattr.2

raw
1 .\" Copyright 2001, Andreas Grünbacher <[email protected]>
2 .\" Copyright 2001, Silicon Graphics, Inc.
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\"
7 .TH removexattr 2 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 removexattr, lremovexattr, fremovexattr \- remove an extended attribute
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <sys/xattr.h>
16 .P
17 .BI "int removexattr(const char *" path ", const char *" name );
18 .BI "int lremovexattr(const char *" path ", const char *" name );
19 .BI "int fremovexattr(int " fd ", const char *" name );
20 .fi
21 .SH DESCRIPTION
22 Extended attributes are
23 .IR name : value
24 pairs associated with inodes (files, directories, symbolic links, etc.).
25 They are extensions to the normal attributes which are associated
26 with all inodes in the system (i.e., the
27 .BR stat (2)
28 data).
29 A complete overview of extended attributes concepts can be found in
30 .BR xattr (7).
31 .P
32 .BR removexattr ()
33 removes the extended attribute identified by
34 .I name
35 and associated with the given
36 .I path
37 in the filesystem.
38 .P
39 .BR lremovexattr ()
40 is identical to
41 .BR removexattr (),
42 except in the case of a symbolic link, where the extended attribute is
43 removed from the link itself, not the file that it refers to.
44 .P
45 .BR fremovexattr ()
46 is identical to
47 .BR removexattr (),
48 only the extended attribute is removed from the open file referred to by
49 .I fd
50 (as returned by
51 .BR open (2))
52 in place of
53 .IR path .
54 .P
55 An extended attribute name is a null-terminated string.
56 The
57 .I name
58 includes a namespace prefix;
59 there may be several,
60 disjoint namespaces associated with an individual inode.
61 .SH RETURN VALUE
62 On success, zero is returned.
63 On failure, \-1 is returned and
64 .I errno
65 is set to indicate the error.
66 .SH ERRORS
67 .TP
68 .B ENODATA
69 The named attribute does not exist.
70 .\" .RB ( ENOATTR
71 .\" is defined to be a synonym for
72 .\" .BR ENODATA
73 .\" in
74 .\" .IR <attr/attributes.h> .)
75 .TP
76 .B ENOTSUP
77 Extended attributes are not supported by the filesystem, or are disabled.
78 .P
79 In addition, the errors documented in
80 .BR stat (2)
81 can also occur.
82 .SH STANDARDS
83 Linux.
84 .SH HISTORY
85 Linux 2.4,
86 glibc 2.3.
87 .\" .SH AUTHORS
88 .\" Andreas Gruenbacher,
89 .\" .RI < [email protected] >
90 .\" and the SGI XFS development team,
91 .\" .RI < [email protected] >.
92 .\" Please send any bug reports or comments to these addresses.
93 .SH SEE ALSO
94 .BR getfattr (1),
95 .BR setfattr (1),
96 .BR getxattr (2),
97 .BR listxattr (2),
98 .BR open (2),
99 .BR setxattr (2),
100 .BR stat (2),
101 .BR symlink (7),
102 .BR xattr (7)