Posted: . At: 4:05 PM. This was 9 years ago. Post ID: 8008
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

How to delete a directory on Linux.

Deleting a directory on Linux is very easy indeed. The rmdir command will perform this task adequately. You could also use the rm -rf abc/ command to delete a directory, but rmdir is easier to remember.

eyjafjallajkull% rmdir abc

The rmdir command will not be able to delete a directory that is not empty, therefore you will need to use the rm -rf command to delete it in that case.

eyjafjallajkull% rm -rf abc

Just be careful when using this command as you could accidentally delete a required directory. But this command is very useful when you are managing your Linux file-system.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.