O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

mkdir

Synopsis

mkdir [options] directories

Creates one or more directories. You must have write permission in the parent directory 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 for new directories. See chmod for an explanation of acceptable formats for mode.

-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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required