The other day I was trying to delete a directory, and in this directory there were alot of files. When I executed the "Remove Directory" command:
CODE:
rmdir html


I got the following error:
CODE:
rmdir: `html': Directory not empty


I was possitive I also wanted to deleted all the files in this directory. I didnt want to delete its files one by one to make it empty. I thought there's got to be a easy and faster way to delete the whole directory at once. I found it!

WARNING: make certain you are 100% sure you want to delete the directory and its files. After you execute this command, there is not turning back. So please make sure you are ready to delete the direcotry (folder)

Example: I want to remove the html directory in /var/www/html to do this i execute these commands:

Change to the /var/www directory:
CODE:
cd /var/www


Check to make sure I am in the /var/www directory
CODE:
pwd


List the files and direcotories in /var/www to be sure the html directory is in the www direcotry
CODE:
ls


INSTEAD OF USING THE RMDIR COMMAND USE THE RM COMMAND:

Now DELETE the html directory and its files and subdirectories
CODE:
rm -rf html


List the files in the www directory to confirm my html directory is gone
CODE:
ls