Log in Go to the main page Page Discussion History Go to the file list Go to the site toolbox

Mkdir command, Linux

From NetworkCommands


Image:Tux_64x64.png

A command available on most Linux platforms; used to create directories on a file system.

Contents

Image:Vm-power-on-medium.png Usage Syntax

mkdir [options]

Common options include;

  • -m=umask - configure the permissions of the directory
  • -p - create parent directories if required
  • -v - display a message for each directory created

Image:Vm-power-on-medium.png Usage Examples

mkdir test - create directory test in the current directory

mkdir -p test/1/ - create directory 1 and necessary parent directory test, in the current directory

mkdir /etc/test/ - create directory test in existing directory /etc

mkdir -m=777 test - create directory test in the current directory, with a umask of 777 (rwx for user, group and other)

mkdir -p /var/www/vhosts/networkstuff.eu/{public,private,log,cgi-bin,backup} - create directory networkstuff.eu in the existing /var/www/vhosts/ directory and create the subdirectories: public,private,log,cgi-bin and backup

Image:accessories-text-editor-v2-medium.png Linux Usage Notes

With most Linux or Unix commands;

  • Brief help can be displayed using the option/keyword: -h or --help, for example: chmod --help
  • A full command manual can be displayed using the man command followed by the command name, for example: man chmod
  • Sometimes 'info' pages are used instead of or to provide more information than man pages; for example: info chmod
  • Version information can be display using the option/keyword: -v or --version, for example: chmod --version

Image:object-flip-horizontal-medium.png Command Equivalents

The Cisco platform command equivalent has the same name: mkdir command, Cisco

Image:Folder-medium.png Related Files

The mkdir executable is normally found here: /bin/mkdir

Image:icemon-medium.png Related Commands

Use the rm command to delete existing directories

Use the pwd command to display (or print) the present working (or current) directory

Image:icemon-medium.png Related Articles

]Information on Linux commands Image:Tux-small.png

Information on F5 BigIP commands Image:F5-logo-small.png

Information on Cisco commands Image:Cisco-logo-small.png

Information on Vyatta commands Image:Vyatta-logo-small.png

Information on Extreme commands Image:Extreme-logo-small.png

Information on Blue Coat SGOS commands

Information on Nokia IPSO commands


Image:internet-group-chat-small.png We really do appreciate all feedback so please do send your comments, suggestions or corrections to steve#networkstuff.eu (replacing the # with an @)



Site Toolbox:

Personal tools
This page was last modified on 27 December 2008, at 20:24. - This page has been accessed 21 times. - Disclaimers - About NetworkCommands
Powered by MediaWiki