.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 .I Rmdir removes the directory .IR name , which must have only .L \&. and .LR \&.. entries. .SH "SEE ALSO .IR mkdir (1), .IR rm (1), .IR mknod (2), .IR stat (2), .IR umask (2) .SH DIAGNOSTICS .IR mkdir : .BR EEXIST , .BR EFAULT , .BR EIO , .BR ELOOP , .BR ENOENT , .BR ENOTDIR , .BR EROFS .br .IR rmdir : .BR EFAULT , .BR EHASF , .BR EINVAL , .BR EIO , .BR ELOOP , .BR ENOENT , .BR ENOTDIR , .BR EROFS