1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
.TH MKDIR 2
.CT 2 dirs
.SH NAME
mkdir, rmdir \(mi make or remove a directory
.SH SYNOPSIS
.nf
.B int mkdir(name, mode)
.B char *name;
.sp
.B int rmdir(name)
.B char *name;
.fi
.SH DESCRIPTION
.I Mkdir
creates a new directory
whose name is the null-terminated string
pointed to by
.IR name .
The mode of the directory
is set to
.IR mode ,
as modified by the process's mode mask (see
.IR stat (2)
and
.IR umask (2)).
The directory initially contains two entries:
.B .
(a link to the directory itself) and
.B ..
(a link to the parent directory).
.PP
If the
.I mode
includes
.BR S_IBLIND ,
the directory is `blind'.
A blind directory cannot be read, and
its security label is not checked when the
directory is searched.
.PP
.I Rmdir
removes the directory
.IR name ,
which must only have the entries
.L \&.
and
.LR \&.. .
.SH "SEE ALSO
.IR mkdir (1),
.IR rm (1),
.IR mknod (2)
.SH DIAGNOSTICS
.B EEXIST
.RI ( mkdir
only),
.BR EFAULT ,
.B EHASF
.RI ( rmdir
only),
.B EINVAL
.RI ( rmdir
only),
.BR EIO ,
.BR ELAB ,
.BR ELOOP ,
.BR ENOENT ,
.BR ENOTDIR ,
.BR EROFS
|