Removing Directories, with files in it

James Mckenzie jjmckenzie51 at earthlink.net
Fri Nov 12 19:49:48 UTC 2004


>Mark Sargent wrote:
>> Hi All,
>> 
>> rmdir .directoryname that contains content in it, just informs me of the
>> fact, and I get no deleted directory. I know I saw how to do this somewhere,
>> just haven't found it again. lol..cheers.
>> 
>> Mark Sargent.
>
>rm -rf dir_name

Word of WARNING:  Make doubly sure that the directory is indeed the directory you want to remove, as this command is not reverseable/undoable.  At best, it will be an inconvience, at worse, you will be rebuilding your system.  I recommend running the print working directory (pwd) command before running the rm -rf <directory_name> command.  I did not do this once and was lucky that I had a very recent (less than five minutes old) backup of the directory structure and files I just removed.  Thank goodness for tar zcvf and a second hard drive.

James McKenzie


James McKenzie
A Proud User of Linux!




More information about the fedora-list mailing list