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