Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #93
Difficulty: Easy
The mkdir command will create a new directory even if the user does not have the required permissions to write to the parent directory of the new directory.
True or False?
Linux & Unix Commands - Search Man Pages

removexattr(2) [mojave man page]

REMOVEXATTR(2)						      BSD System Calls Manual						    REMOVEXATTR(2)

removexattr, fremovexattr -- remove an extended attribute value SYNOPSIS
#include <sys/xattr.h> int removexattr(const char *path, const char *name, int options); int fremovexattr(int fd, const char *name, int options); DESCRIPTION
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc). removexattr() deletes the extended attribute name associated with path. An extended attribute's name is a simple NULL-terminated UTF-8 string. Options is a bit mask specifying various options: XATTR_NOFOLLOW do not follow symbolic links. Normally, removexattr() acts on the target of path if it is a symbolic link. With this option, removexattr() will act on the link itself. XATTR_SHOWCOMPRESSION removexattr() and fremovexattr() will remove HFS Plus Compression extended attribute name (if present) for the file referred to by path or fd. fremovexattr() is identical to removexattr(), except that it removes an extended attribute from an open file referenced by file descriptor fd. RETURN VALUES
On success, 0 is returned. On failure, -1 is returned and the global variable errno is set as follows. ERRORS
[ENOATTR] The specified extended attribute does not exist. [ENOTSUP] The file system does not support extended attributes or has the feature disabled. [EROFS] The file system is mounted read-only. [EPERM] This type of object does not support extended attributes. [EINVAL] name or options is invalid. name must be valid UTF-8 options must make sense. [ENOTDIR] A component of the path 's prefix is not a directory. [ENAMETOOLONG] Name exceeded XATTR_MAXNAMELEN UTF-8 bytes, or a component of path exceeded NAME_MAX characters, or the entire path exceeded PATH_MAX characters. [EACCES] Search permission is denied for a component path or permission to remove the attribute is denied. [ELOOP] Too many symbolic links were encountered in path. [EFAULT] path or name points to an invalid address. [EIO] An I/O error occurred while reading from or writing to the file system. SEE ALSO
getxattr(2), listxattr(2), setxattr(2) HISTORY
removexattr() and fremovexattr() first appeared in Mac OS X 10.4. Mac OS X Oct 19, 2004 Mac OS X

Check Out this Related Man Page

REMOVEXATTR(2)						     Linux Programmer's Manual						    REMOVEXATTR(2)

removexattr, lremovexattr, fremovexattr - remove an extended attribute SYNOPSIS
#include <sys/types.h> #include <sys/xattr.h> int removexattr(const char *path, const char *name); int lremovexattr(const char *path, const char *name); int fremovexattr(int fd, const char *name); DESCRIPTION
Extended attributes are name:value pairs associated with inodes (files, directories, symbolic links, etc.). They are extensions to the normal attributes which are associated with all inodes in the system (i.e., the stat(2) data). A complete overview of extended attributes concepts can be found in attr(5). removexattr() removes the extended attribute identified by name and associated with the given path in the filesystem. lremovexattr() is identical to removexattr(), except in the case of a symbolic link, where the extended attribute is removed from the link itself, not the file that it refers to. fremovexattr() is identical to removexattr(), only the extended attribute is removed from the open file referred to by fd (as returned by open(2)) in place of path. An extended attribute name is a null-terminated string. The name includes a namespace prefix; there may be several, disjoint namespaces associated with an individual inode. RETURN VALUE
On success, zero is returned. On failure, -1 is returned and errno is set appropriately. ERRORS
ENOATTR The named attribute does not exist. (ENOATTR is defined to be a synonym for ENODATA in <attr/xattr.h>.) ENOTSUP Extended attributes are not supported by the filesystem, or are disabled. In addition, the errors documented in stat(2) can also occur. VERSIONS
These system calls have been available on Linux since kernel 2.4; glibc support is provided since version 2.3. CONFORMING TO
These system calls are Linux-specific. SEE ALSO
getfattr(1), setfattr(1), getxattr(2), listxattr(2), open(2), setxattr(2), stat(2), attr(5), symlink(7) Linux 2014-02-06 REMOVEXATTR(2)

Featured Tech Videos