Basic Linux Tutorial
Computer Tutorial

Working with Directories ( mkdir & rmdir Commands)



Working with Directories

mkdir

mkdir command are used to create a new directory (sub directory)
Synopsis :
mkdir [option] directory name
Example :
mkdir   generalnote
Option
-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

rmdir

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