in

How to delete a directory in Linux command line

How to delete a directory in Linux command line

When attempting to remove a directory in the command line on a Linux box you may receive an error “directory not empty” when trying to run

rmdir  thedirectorytodelete

The solution to this is to run

rm -rf thedirectorytodelete

This will force the directory and all the contents there in to be erased.

You will be asked if you wish to proceed

 

If you want to be asked for each file, then you would do

rm -r thedirectorytodelete

 

remember always to use caution when using  rm -rf as

rm -rf /

Would be disastrous.

What do you think?

Written by Evilware

How to Upgrade to PHP 7.3 on CENTOS 7

How to Install PHP 7.3 on CentOS

Windows 10 Network Performance Game Tweaks

Windows 10 Network Performance Game Tweaks