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