(Reading time: 1 minute)

Linux

The command,

 
 
 
rmdir dir1
 
 
 

will remove the directory dir1 only if it is empty. Else you will get an error message,

rmdir: failed to remove `dir1': Directory not empty

The following command removes the directory and the sub-directories

 
 
 
rm -rf dir1
 
 
 

Similar articles

Chillzee Tag Cloud

About Chillzee

Chillzee.com is an entrepreneurship portal.

The site provides informative topics on Organizational and Strategic needs.