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