OSDN Git Service

3f7cc27521f2e70c2b159e8eaa0d679cecfb69dc
[linuxjm/LDP_man-pages.git] / original / man2 / removexattr.2
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 2014-02-06 "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/types.h>
32 .B #include <sys/xattr.h>
33 .sp
34 .BI "int removexattr(const char\ *" path ", const char\ *" name );
35 .BI "int lremovexattr(const char\ *" path ", const char\ *" name );
36 .BI "int fremovexattr(int " fd ", const char\ *" name );
37 .fi
38 .fam T
39 .SH DESCRIPTION
40 Extended attributes are
41 .IR name :\c
42 value pairs associated with inodes (files, directories, symbolic links, etc.).
43 They are extensions to the normal attributes which are associated
44 with all inodes in the system (i.e., the
45 .BR stat (2)
46 data).
47 A complete overview of extended attributes concepts can be found in
48 .BR attr (5).
49 .PP
50 .BR removexattr ()
51 removes the extended attribute identified by
52 .I name
53 and associated with the given
54 .I path
55 in the filesystem.
56 .PP
57 .BR lremovexattr ()
58 is identical to
59 .BR removexattr (),
60 except in the case of a symbolic link, where the extended attribute is
61 removed from the link itself, not the file that it refers to.
62 .PP
63 .BR fremovexattr ()
64 is identical to
65 .BR removexattr (),
66 only the extended attribute is removed from the open file referred to by
67 .I fd
68 (as returned by
69 .BR open (2))
70 in place of
71 .IR path .
72 .PP
73 An extended attribute name is a simple null-terminated string.
74 The
75 .I name
76 includes a namespace prefix; there may be several, disjoint
77 namespaces associated with an individual inode.
78 .SH RETURN VALUE
79 On success, zero is returned.
80 On failure, \-1 is returned and
81 .I errno
82 is set appropriately.
83 .SH ERRORS
84 .TP
85 .B ENOATTR
86 The named attribute does not exist.
87 .RB ( ENOATTR
88 is defined to be a synonym for
89 .BR ENODATA
90 in
91 .IR <attr/xattr.h> .)
92 .TP
93 .B ENOTSUP
94 Extended attributes are not supported by the filesystem, or are disabled.
95 .PP
96 In addition, the errors documented in
97 .BR stat (2)
98 can also occur.
99 .SH VERSIONS
100 These system calls have been available on Linux since kernel 2.4;
101 glibc support is provided since version 2.3.
102 .SH CONFORMING TO
103 These system calls are Linux-specific.
104 .\" .SH AUTHORS
105 .\" Andreas Gruenbacher,
106 .\" .RI < a.gruenbacher@computer.org >
107 .\" and the SGI XFS development team,
108 .\" .RI < linux-xfs@oss.sgi.com >.
109 .\" Please send any bug reports or comments to these addresses.
110 .SH SEE ALSO
111 .BR getfattr (1),
112 .BR setfattr (1),
113 .BR getxattr (2),
114 .BR listxattr (2),
115 .BR open (2),
116 .BR setxattr (2),
117 .BR stat (2),
118 .BR attr (5),
119 .BR symlink (7)
120 .SH COLOPHON
121 This page is part of release 3.79 of the Linux
122 .I man-pages
123 project.
124 A description of the project,
125 information about reporting bugs,
126 and the latest version of this page,
127 can be found at
128 \%http://www.kernel.org/doc/man\-pages/.