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.
Hope this isn't a stupid question but I did a search and couldn't find the answer. I am using ubuntu 8.04 and have a separate home partition. While setting it up I had a few failures and was left with several directories containing many hidden files which I can't seem to delete. The man pages for 'rm' didn't seem to provide the answer either.
Is there a flag or escape sequence that will allow 'rm' to delete these files?
WARNING: using "rm -rf" could be like killing ants with a pile driver.....
First, can you see the files you want to delete? "ls -a" should show all hidden files.
Second, check permissions. Or just su to root (or use sudo in Ubuntu and its progeny)
If all is in order and you still cannot delete something, then "rm -rf directoryname" can do the trick. First, be absolutely sure that you know what is in that directory.
Before doing any of this, having all you data backed up is always a nice touch........
pixellany your absolutely right, it's risky and should not be done unless you're sure what you're doing. My mistake was to take for granted that the user knew what he was doing and therefore I provided this suggestion. What I should have done was to warn him first and then provide the solution. Thank you for the comment, I'll be more careful in the future.
rm -rf * does not delete your hidden direcotories. why dont you try with "rm -rf .*"? After executing this, it may give the the error rm: cannot remove `.' or `..'
kingston said:
"why dont you try with "rm -rf .*"?"
I did try that but it did not work. Like I said, I am not sure why.
Also, this is my first post to this forum and it wasn't obvious to me how to mark this thread as solved. Hopefully, putting it in the title block will work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.