Windows DatabaseebooksStatistical Information

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

Symptom:

You need to delete a directory tree with all contents

Cause:

none

Solution:

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. 

 


Disclaimer:

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-2011 Lubby (V3.0.10 Aug 2011)
Sponsored by Keskon.
Statistical information by Google Analytics