|
|
1.1 root 1: .\" Copyright (c) 1983 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)rmdir.2 6.3 (Berkeley) 8/26/85
6: .\"
7: .TH RMDIR 2 "August 26, 1985"
8: .UC 5
9: .SH NAME
10: rmdir \- remove a directory file
11: .SH SYNOPSIS
12: .nf
13: .ft B
14: rmdir(path)
15: char *path;
16: .fi
17: .ft R
18: .SH DESCRIPTION
19: .I Rmdir
20: removes a directory file
21: whose name is given by
22: .I path.
23: The directory must not have any entries other
24: than \*(lq.\*(rq and \*(lq..\*(rq.
25: .SH "RETURN VALUE
26: A 0 is returned if the remove succeeds; otherwise a \-1 is
27: returned and an error code is stored in the global location \fIerrno\fP\|.
28: .SH ERRORS
29: The named file is removed unless one or more of the
30: following are true:
31: .TP 15
32: [ENOTDIR]
33: A component of the path is not a directory.
34: .TP 15
35: [EINVAL]
36: The pathname contains a character with the high-order bit set.
37: .TP 15
38: [ENAMETOOLONG]
39: A component of a pathname exceeded 255 characters,
40: or an entire path name exceeded 1023 characters.
41: .TP 15
42: [ENOENT]
43: The named directory does not exist.
44: .TP 15
45: [ELOOP]
46: Too many symbolic links were encountered in translating the pathname.
47: .TP 15
48: [ENOTEMPTY]
49: The named directory contains files other than ``.'' and ``..'' in it.
50: .TP 15
51: [EACCES]
52: Search permission is denied for a component of the path prefix.
53: .TP 15
54: [EACCES]
55: Write permission is denied on the directory containing the link
56: to be removed.
57: .TP 15
58: [EPERM]
59: The directory containing the directory to be removed is marked sticky,
60: and neither the containing directory nor the directory to be removed
61: are owned by the effective user ID.
62: .TP 15
63: [EBUSY]
64: The directory to be removed is the mount point
65: for a mounted file system.
66: .TP 15
67: [EIO]
68: An I/O error occurred while deleting the directory entry
69: or deallocating the inode.
70: .TP 15
71: [EROFS]
72: The directory entry to be removed resides on a read-only file system.
73: .TP 15
74: [EFAULT]
75: .I Path
76: points outside the process's allocated address space.
77: .SH "SEE ALSO"
78: mkdir(2), unlink(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.