Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Make SURE you type that in right, especially if you are root. It does not ask questions about what you are doing.
I had moved my Gentoo to a new hard drive and I booted the old drive and typed in rm -rf /* just to see what it would do. It ran until it deleted something that it needed then errored out. About 90% of the files were gone, I think it was something in /usr/sbin. Trust me, it will delete what you tell it, even if you tell it wrong.
rm -r alone doesn't work because by default rm doesn't remove directories - only their contents and tells you it can't remove a directory because it is a directory. The -f flag says to disregard all warning conditions and force the remove.
As pointed out by others it is useful for removing an entire directory tree but can be very dangerous if you don't use it correctly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.