Search notes:

Shell command: mkdir

Creating nested (sub-)directories

mkdir (without -p) will won't create a directory under a directory that does not exist:
$ mkdir foo/bar/baz
mkdir: cannot create directory ‘foo/bar/baz’: No such file or directory
However, using the -p option, it will:
$ mkdir foo/bar/baz
$ cd foo/bar/baz

See also

Perl function: mkdir
Shell commands

Index