You are on page 1of 5

Working with Directories

Creating a new directory


mkdir
E.g:

: to create a new directory.


mkdir testdir

Changing directories
cd

: Used to move between directories.

cd

path-to-dir : Move to a specific directory


cd .. Move to parent directory
cd : Move to last working directory
cd : Move to Home directory

Checking current directory


pwd:

Prints current working directory.

Removing Directories
rmdir

: Removes an empty directory

rm

: Used to remove a content


(file/directory).
rm

r <directory> : removes a directory


recursively.
rm <filename> : Removes a file.

You might also like