Go2Linux | Linux Operating System

A site dedicated to: Linux Operating System

mkdir - Linux command line command for create directories

Date: 2007-05-10 00:00:00 -0400

mkdir 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.

If you liked this article please share it.

powered by TinyLetter

If you want to contact me in any other way, please use the contact page.