Fix Error: Rmdir: `html': Directory Not Empty



Fix Error: Rmdir: `html': Directory Not Empty
Fix Error: Rmdir: `html': Directory Not Empty
Post Description:
Post Tags: fix, error, rmdir, html, directory, not, empty
This Post Has Been Viewed 1751 Times Since Sun Jul 30, 2006 10:34 am Posted By administrator with 3 replies
Fix Error: Rmdir: `html': Directory Not Empty
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

Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About Fix Error: Rmdir: `html': Directory Not Empty




:: 1 :: #371 - Reply By Aniket Arondekar On Thu Feb 15, 2007 10:20 am
That was of great help....thanks a lot
:: 2 :: #45875 - Reply By Samuel On Mon Mar 17, 2008 11:15 am
super. i was revolving around rmdir finally used rm as per your suggestion. its coool. thats worked
:: 3 :: #56209 - Reply By scotty On Mon Jun 02, 2008 11:01 am
thx! this was great