Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rmdir(2) — HP-UX 6.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mkdir(2)

unlink(2)

RMDIR(2)  —  HP-UX

NAME

rmdir − remove a directory file

SYNOPSIS

rmdir(path)
char *path;

REMARKS

Not all systems implement this as a system call; some use a library call to the rmdir(1) command to achieve the same effect.  The errors documented below will appear in any case, and no error messages will ever be printed.

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 remove 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 are 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. 

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

[ENAMETOOLONG]
The path name exceeds MAXPATHLEN characters.

[ENOENT] A component of the path name is too long. 

[ENOENT] The named file does not exist. 

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

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

[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. 

DEPENDENCIES

Series 500
The directory entries "." and ".." are recognized, but files of the same names do not appear in the dir structure. 

AUTHOR

Rmdir was developed by the University of California, Berkeley California, Computer Science Division, Department of Electrical Engineering and Computer Science. 

SEE ALSO

mkdir(2), unlink(2). 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

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