Preface
Introduction
Practice Setup
Linux Architecture
Basic Commands
Basic file management or operations on file
User administration
Networking
Linux Interview Questions

 

 

Mkdir :

this command is used to create a new directory. In a current path, if you want to create a new directory using mkdir can used. it stands for make directory.

Syntax :

$ mkdir [ directory name ]
$pwd
/admin
$ mkdir abclearn
$pwd
/admin
$cd abclearn
$pwd
/admin/abclearn
Options
-m : set file mode
-p : create parent directories as necessary.
-v : print a message for each created directory.
-Z : set the SELinux security context of each created directory to the context CTX.
Examples
$ mkdir abclearn
Crates a new directory called abclearn whose parent is the current directory.
$ mkdir –m a=rwx abclearn
Create the abclean directory, and set its permissions such that all users may read, write and execute the contents.
$ mkdir –p /admin/abc/learn
Creates the directory /admin/abc/learn. If the parent directory /admin/abc/learn does not already exist, mkdir will create that directory first.