Mkdir command, Linux
From NetworkCommands
A command available on most Linux platforms; used to create directories on a file system.
Contents |
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
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
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
Command Equivalents
The Cisco platform command equivalent has the same name: mkdir command, Cisco
Related Files
The mkdir executable is normally found here: /bin/mkdir
Related Commands
Use the rm command to delete existing directories
Use the pwd command to display (or print) the present working (or current) directory
Related Articles
]Information on Linux commands
Information on F5 BigIP commands
Information on Cisco commands
Information on Vyatta commands
Information on Extreme commands
Information on Blue Coat SGOS commands
Information on Nokia IPSO commands







