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