seccomp_unotify.2: tfix
[man-pages.git] / man2 / removexattr.2
blob52e2ddacbd2dd06c523443e693fcf435703cb670
1 .\" Copyright (C) Andreas Gruenbacher, February 2001
2 .\" Copyright (C) Silicon Graphics Inc, September 2001
3 .\"
4 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, see
22 .\" <http://www.gnu.org/licenses/>.
23 .\" %%%LICENSE_END
24 .\"
25 .TH REMOVEXATTR 2 2021-03-22 "Linux" "Linux Programmer's Manual"
26 .SH NAME
27 removexattr, lremovexattr, fremovexattr \- remove an extended attribute
28 .SH SYNOPSIS
29 .fam C
30 .nf
31 .B #include <sys/xattr.h>
32 .PP
33 .BI "int removexattr(const char\ *" path ", const char\ *" name );
34 .BI "int lremovexattr(const char\ *" path ", const char\ *" name );
35 .BI "int fremovexattr(int " fd ", const char\ *" name );
36 .fi
37 .fam T
38 .SH DESCRIPTION
39 Extended attributes are
40 .IR name : value
41 pairs associated with inodes (files, directories, symbolic links, etc.).
42 They are extensions to the normal attributes which are associated
43 with all inodes in the system (i.e., the
44 .BR stat (2)
45 data).
46 A complete overview of extended attributes concepts can be found in
47 .BR xattr (7).
48 .PP
49 .BR removexattr ()
50 removes the extended attribute identified by
51 .I name
52 and associated with the given
53 .I path
54 in the filesystem.
55 .PP
56 .BR lremovexattr ()
57 is identical to
58 .BR removexattr (),
59 except in the case of a symbolic link, where the extended attribute is
60 removed from the link itself, not the file that it refers to.
61 .PP
62 .BR fremovexattr ()
63 is identical to
64 .BR removexattr (),
65 only the extended attribute is removed from the open file referred to by
66 .I fd
67 (as returned by
68 .BR open (2))
69 in place of
70 .IR path .
71 .PP
72 An extended attribute name is a null-terminated string.
73 The
74 .I name
75 includes a namespace prefix; there may be several, disjoint
76 namespaces associated with an individual inode.
77 .SH RETURN VALUE
78 On success, zero is returned.
79 On failure, \-1 is returned and
80 .I errno
81 is set to indicate the error.
82 .SH ERRORS
83 .TP
84 .B ENODATA
85 The named attribute does not exist.
86 .\" .RB ( ENOATTR
87 .\" is defined to be a synonym for
88 .\" .BR ENODATA
89 .\" in
90 .\" .IR <attr/attributes.h> .)
91 .TP
92 .B ENOTSUP
93 Extended attributes are not supported by the filesystem, or are disabled.
94 .PP
95 In addition, the errors documented in
96 .BR stat (2)
97 can also occur.
98 .SH VERSIONS
99 These system calls have been available on Linux since kernel 2.4;
100 glibc support is provided since version 2.3.
101 .SH CONFORMING TO
102 These system calls are Linux-specific.
103 .\" .SH AUTHORS
104 .\" Andreas Gruenbacher,
105 .\" .RI < a.gruenbacher@computer.org >
106 .\" and the SGI XFS development team,
107 .\" .RI < linux-xfs@oss.sgi.com >.
108 .\" Please send any bug reports or comments to these addresses.
109 .SH SEE ALSO
110 .BR getfattr (1),
111 .BR setfattr (1),
112 .BR getxattr (2),
113 .BR listxattr (2),
114 .BR open (2),
115 .BR setxattr (2),
116 .BR stat (2),
117 .BR symlink (7),
118 .BR xattr (7)