Unix directory commands


mkdir


cd


rmdir


mkdir: Creating a directory which has set of files & sub directories.


Syn:


$mkdir directory name


Example:


$mkdir hyd


$mkdir chennai


cd: Used for changing/closing directory



Example:


$cd chennai


$chennai>


If we want to come back to my previous directory we can use like


$chennai>cd ..


$ cd               --> come back to root directory


If we want to come back more than one directory then


$chennai>places>cd ../..     --> this command is back to 2 directories


rmdir: Used for removes/deletes directory only if is empty.


syn:


$rmdir directory name


Example:


$rmdir chennai

Followers