How to delete a directory even if it's not empty?

You might have seen, while using the "rmdir" command that you cannot delete this directory as it is not empty.

Use the following command :

> rm -r directoryName

or

> rm -rf directory_Name

so, "f" represents force. So, it will skip all the necessary checks and simply wipe out the whole directory.

Use SUDO, if you still cannot delete.



Enjoy Linux...!!!!
+CentOS
+Linux
+Ubuntu

0 comments:

Post a Comment