Windows DatabaseebooksStatistical Information

LLE10052 : Howto remove a complete directory tree from the command line


You need to delete a directory tree with all contents




To remove a directory you can use the rmdir command. To delete a directory, it has to be empty.

The preferred method of removing a directory tree with all its content ist the following command:

rm -rf TheDirectory

Please note the power of this command. I do not like to use these things. I prefer using the mc (= midnight commander) and use the F8 functionality. The  parameter -f stand for force and the -r stand for recursive.

When the directory only contains a few files I use:

rm -ri TheDirectory

Now it asks for every deletion. Even admins need this security from time to time. 



The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!
Copyright © 2004-2016 Lubby (V3.0.11 Jan 2016)
Sponsored by Keskon.
Datenschutzerklaerung - Privacy statement - Privacyverklaring