mkdir

Mkdir is an abbreviation for make directory ( German: make directory), which is used as a command in Unix, DOS, OS / 2 and Microsoft Windows, as well as in the PHP scripting language to create new directories ( sometimes abbreviated md).

Use

Mkdir directory name where directory name stands for the directory to be created. If the command is executed in the normal console, the new folder will be applied from the current directory.

Parameter

In Unix-like operating systems, mkdir has, among others, the following paramaters:

  • -p: creates the directories, if they do not exist. If the directory already exist, no error is issued and continuing.
  • -v: Specifies the directories created on the console, use mostly with -p.
  • -m: has the directories to the rights that are specified as file permission after the parameter in the octal value.

-p is usually used to build more complex file hierarchies with mkdir, for example by makefiles.

Examples

An example of p is:

Mkdir -p / tmp / a / b / c If / tmp / a already exists, but / tmp / a / b is not so created mkdir / tmp / a / b before / tmp / a / b / c adds.

It is also possible to create a complete tree:

Mkdir -p tmpdir / { trunk / sources / { includes, docs }, branches, tags } If variables are used in a bash script, so that is the eval function requires:

DOMAIN_NAME = includes, docs eval " mkdir -p tmpdir / { trunk / sources / { $ { DOMAIN_NAME }}, branches, tags }" The result is the following tree:

Tmpdir      ________ | ______     | | | branches tags trunk                     |                   sources                 ____ | _____                | |            includes docs Web Links

  • Microsoft TechNet article Mkdir

Chgrp | chown | chmod | cp | dd | df | dir | dircolors | install | ln | ls | mkdir | mkfifo | mknod | mv | rm | rmdir | shred | sync | touch | vdir

Cat | cksum | comm | csplit | cut | expand | fmt | fold | head | join | md5sum | nl | od | paste | ptx | pr | sha1sum | sort | split | sum | tac | tail | tr | tsort | unexpand | uniq | wc

basename | chroot | date | dirname | du | echo | env | expr | factor | false | groups | hostid | id | link | logname | nice | nohup | pathchk | pinky | printenv | printf | pwd | readlink | seq | sleep | stat | stty | tee | test | true | tty | uname | unlink | Forums | who | whoami | yes

  • UNIX software
  • DOS operating system component
576765
de