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.
Hello everyone.
To complete my piece of work I need to name a type of file that cannot be deleted by the rm command. I've searched google monotonously but I can't seem to find an answer for it. Any help would be great, thanks!
Welcome to the forum ... where we do not take the habit of helping out with your homework...but, since you're new here , and may not have read the rules yet, here's the man page on rm..
You can't remove files that have already been removed. For instance if you "rm /dev/zero" twice you can watch what happens the 2nd time. (Don't try this on hosts you aren't prepared to fix if they break.)
DO NOT APOLOGISE!!!No need to. Asking a question (no matter how silly someone thinks it is) is what this place is about...No question is too silly to be asked here...believe me...I should know...
Did these answers help you? Do you need more input? Again: welcome here
As far as I know rm can delete any type of file. But a wierd thought coming in my mind, if you're not logged in as root/super-user, then even using rm you cannot delete any write protected (i.e. file having no write permission) file for any user, whatever it's type is.
Not true. You can remove a file you don't have permissions for, as long as you have write permission for the directory its sitting in.
file permissions control access to the contents of the file. directory permissions control what you can do to the things that exist in the directory.
Thanks for correction David. OP can conclude that rm won't delete files/dir. which are inside a write protected directory. Or user cannot delete a file/dir. from a directory that has set sticky bit and user isn't it's owner or root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.