Basic Linux Tutorial
Computer Tutorial

Working with Directories ( mkdir & rmdir Commands)

Working with Directories


mkdir command are used to create a new directory (sub directory)
Synopsis :
mkdir [option] directory name
Example :
mkdir   generalnote
-m   set permission mode (as in chmode)
-p   no error if existing, make parent directory as needed
-v   print a message for each created directory


When a directory is empty, rmdir command are used to remove the directory
Synopsis :
rmdir [option] directory
Example :
rmdir   generalnote
-p   remove directory and its content
-v   output a diagnostic for every directory processed