2 .\" Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
4 .\" @APPLE_LICENSE_HEADER_START@
6 .\" This file contains Original Code and/or Modifications of Original Code
7 .\" as defined in and that are subject to the Apple Public Source License
8 .\" Version 2.0 (the 'License'). You may not use this file except in
9 .\" compliance with the License. Please obtain a copy of the License at
10 .\" http://www.opensource.apple.com/apsl/ and read it before using this
13 .\" The Original Code and all software distributed under the License are
14 .\" distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 .\" FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 .\" Please see the License for the specific language governing rights and
19 .\" limitations under the License.
21 .\" @APPLE_LICENSE_HEADER_END@
29 .Nd remove an extended attribute value
31 .Fd #include <sys/xattr.h>
33 .Fn removexattr "const char *path" "const char *name" "int options"
35 .Fn fremovexattr "int fd" "const char *name" "int options"
37 Extended attributes extend the basic attributes associated with files and
38 directories in the file system. They are stored as name:data pairs
39 associated with file system objects (files, directories, symlinks, etc).
42 deletes the extended attribute
47 An extended attribute's
49 is a simple NULL-terminated UTF-8 string.
51 is a bit mask specifying various options:
53 .Bl -tag -width XATTR_NOFOLLOW
55 do not follow symbolic links. Normally,
59 if it is a symbolic link. With this option,
61 will act on the link itself.
67 except that it removes an extended attribute from an open file referenced
71 On success, 0 is returned. On failure, -1 is returned and the global
78 The specified extended attribute does not exist.
80 The file system does not support extended attributes or has the feature
83 The file system is mounted read-only.
85 This type of object does not support extended attributes.
98 prefix is not a directory.
99 .It Bq Er ENAMETOOLONG
103 UTF-8 bytes, or a component of
107 characters, or the entire
113 Search permission is denied for a component
115 or permission to remove the attribute is denied.
117 Too many symbolic links were encountered in
123 points to an invalid address.
125 An I/O error occurred while reading from or writing to the file system.
135 first appeared in Mac OS X 10.4.