Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rmdir(2) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mkdir(2)

unlink(2)

RMDIR(2)

NAME

rmdir − remove a directory file

SYNOPSIS

rmdir(path)
char *path;

DESCRIPTION

Rmdir removes a directory file whose name is given by path.  The directory must be empty (except for files "." and "..") before it can be removed. 

RETURN VALUE

A 0 is returned if the directory removal succeeds; otherwise, a −1 is returned and an error code is stored in the global location errno.

ERRORS

The named file is removed unless one or more of the following is true:

[EACCES] A component of the path prefix denies search permission. 

[EACCES] Write permission is denied on the directory containing the link to be removed. 

[EBUSY] The directory to be removed is the mount point for a mounted file system. 

[EEXIST] The named directory is not empty.  It contains files other than "." and "..". 

[EFAULT] Path points outside the process’s allocated address space.  The reliable detection of this error is implementation dependent. 

[ENAMETOOLONG]
The length of the specified path name exceeds PATH_MAX bytes, or the length of a component of the path name exceeds NAME_MAX bytes while _POSIX_NO_TRUNC is in effect. 

[ENOENT] The named file does not exist. 

[ENOTDIR] A component of the path is not a directory. 

[EROFS] The directory entry to be removed resides on a read-only file system. 

[EINVAL] The path is ".". 

[ELOOP] Too many symbolic links were encountered in translating the path name. 

AUTHOR

Rmdir was developed by the University of California, Berkeley. 

SEE ALSO

mkdir(2), unlink(2). 

STANDARDS CONFORMANCE

rmdir: SVID2, XPG3, POSIX.1, FIPS 151-1

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026