recursively removing directories
The reason I asked is because I expanded a *.tar.gz file to look-at/build and then decided I needed to erase the directory later....Thanks for the warning....
Matthew
Quoted 22 lines · On Sun, 30 Jun 2002 08:26:37 +0000 Richard Adams <[email protected]> writes:
Quoted 1 line · Matthew Stapleton
How do I recursively remove all the subdirectories and contents of
a
Quoted 1 line
particular directory in Linux? I know of 'rmdir', but this only
works for
Quoted 1 line
empty directories. I need something like DOS's 'deltree'.
You got 2 other answers to your question, one mentioned the need to be "very
carefull" with rm, what they did not say is you can wipe out your complete
system with rm and its options.
I would strongly advise you to use 'mc' the linux answer to midnight-commander.
You will have more oversight as to what you are deleting and will not be faced
with the same problem we saw here a few days ago when someone asked how he
could recover his system after he made a mistake with rm -rf.Quoted 1 line
Quoted 17 lines
Quoted 2 lines
Thanks,
Matthew StapletonSignature · 12 lines
Regards Richard [email protected] http://people.zeelandnet.nl/pa3gcu/ - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 3 lines · Matthew Stapleton
The reason I asked is because I expanded a *.tar.gz file to look-at/build and then decided I needed to erase the directory later....Thanks for the warning....
Ok, well you can read a tar.gz file first with 'zless' you can then navigate thro' it with the search option which is '/' an example would be; zless foo.tar.gz
/INSTALL
Now you will see all instances of the word INSTALL, ctrl-l goes to the next instance.
man less will explain.
Another hint to remove dirs is go into the directory to be deleted, then use rm -rf * and or rm -rf .* then cd .. rmdir <foo>
That way is a safer method but caution is the word.
Quoted 3 lines
Matthew
Signature · 11 lines
Regards Richard [email protected] http://people.zeelandnet.nl/pa3gcu/ - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs