- Forums
- Linux Hosting
- [Solved] Fix Error: Rmdir: `html': Directory Not Empty Linux Command
this post will show you how to solve and error you might be getting in your linux when you try to delete it and you get the message error: rmdir not empy [379], Last Updated: Sat May 18, 2024
administrator
Sun Jul 30, 2006
4 Comments
2835 Visits
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
https://www.wallpaperama.com/forums/fix-error-rmdir-html-directory-not-empty-t80.html