View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Mkdir

From LQWiki

Jump to: navigation, search

mkdir is the command used to create directories. The syntax is mkdir options dirname. The option -m specifies the mode (permissions) of the created directory and -p creates any parents - for instance, mkdir -p parent/child creates both directories.

Contrary to the misleading desktop metaphor, a directory is not a 'folder'. A paper folder contains paper files. A directory is a directory - it contains no files, but is itself a file that contains a list of names mapped to numbers which locate the files on disk. A directory always contains at least the two entries '.' (which refers to itself) and '..' (which refers to its parent).

Many people are used to using md as the command to make directories, so it is often aliased.

  alias md=mkdir    # In bash, etc.
  alias md mkdir    # In tcsh, etc.

External links


Share

Personal tools