Name
mkdir
Synopsis
mkdir [options
]directories
Creates one or more directories
. You must
have write permission in the parent directory in order to create a
directory. See also rmdir
. The default mode of the
new directory is 0777, modified by the system or
user’s umask
.
Options
-
-m
Set the access
mode
chmod
for an explanation of acceptable formats formode
.-
-p
Create intervening parent directories if they don’t exist.
-
-v
Verbose mode. Print directories as they’re created.
Examples
Create a read-only directory named
personal
:
$ mkdir -m 444 personal
The following sequence:
$mkdir work; cd work
$mkdir junk; cd junk
$mkdir questions; cd ../..
can be accomplished by typing this:
$ mkdir -p work/junk/questions
Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.