mkdir command in Linux / Unix






Linux mkdir command.

mkdir  Creates directories with the given names. mkdir creates the DIRECTORY(ies), if they do not already exist.

mkdir command syntax

mkdir [OPTION]… DIRECTORY…

mkdir mkdir dir1 dir2 dir3 create directories dir1, dir2, dir3

mkdir command options

mkdir command main options:

option description
-m, –mode=MODE set file mode (as in chmod), not a=rwx – umask
-p, –parents no error if existing, make parent directories as needed
-v, –verbose print a message for each created directory
-Z, –context=CTX set the SELinux security context of each created directory to CTX
–help display this help and exit
–version output version information and exit

mkdir command examples

Now let us practice some mkdir commands.

 

mkdir – create directory:

 


mkdir -p parent/child – To create directory paths with parent directories that do not exist:

 


Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com


Stuff I use to make videos

Windows notebook – http://amzn.to/2zcXPyF

Apple MacBook Pro – http://amzn.to/2BTJBZ7

Desktop - http://amzn.to/2zct252

Microphone – http://amzn.to/2zcYbW1

notebook mouse – http://amzn.to/2BVs4Q3

Screen Recording Software – Camtasia