mkdir - Linux command line command for create directories
Follow @ggarronmkdir is a well know command or at least should be, it is used for creating directories from the command line.
It is really easy to use, but remember that you need permission to write on the directory where you are planning to create a new directory
Usage mkdir [option] directory-list
options
- -m
- Sets the permission to the mode indicated, you can use the octal mode
- -p
- Create parent directories if they do not exist to create the directory you are asking Linux to create
- -v
- Displays which directories were created, if you use the -p option you will find this useful
Examples
mkdir -p parent/child
This will create the directory parent if it does not exists.
mkdir -m 0700 directory1
This creates the directory named directory1, where the owner can read, write and execute files.