RESPONSE BELOW
On 03/24/2017 08:20 AM, Scott scottro@nyc.rr.com [LINUX_Newbies] wrote:
>
>
> On Fri, Mar 24, 2017 at 01:33:30PM +0100, 'highskywhy@yahoo.de'
> highskywhy@yahoo.de [LINUX_Newbies] wrote:
>> hello
>> how to delete undeletable htm files?
>>
>> I found rm -f
>> But in the manual is written rm -f or rm -ff are very dangerous.
>> What can I do wrong?
>
> -f means force. However, if you don't have write permissions to the file,
> you still won't be able to do it.
>
> I'm not familiar with -ff, you may mean -rf. The -r means recursive--that
> is, if you're removing a directory, adding -r to it means you're removing
> everything in that directory. It can be dangerous because it doesn't go
> into trash, it is gone forever.
>
> If you are in the wrong directory when you type it, you can damage your
> system. For example, if you're in the /usr directory and think you are in a
> user's directory, and you do sudo rm -rf * that will remove everything
> under /usr, breaking the system.
>
> It's always good to do echo rm -rf <whatever> before doing it, which will
> show you the results. I remember working on a server we hosted, and though
> these days, I seldom bother with echo rm -rf, for whatever reason, I did.
> It turned out that I was in the / directory, rather than where I thought I
> was, and if I'd just done rm -rf *, I would have brought the client down
> till we could restore from backups.
>
> Again, the file you mention may need root privilege to be removed, that's
> a more likely reason than not using -f, unless for some reason, it's been
> made immutable--that is, maybe someone ran a chattr on it, making the file
> unable to be removed.
>
> --
> Scott Robbins
> PGP keyID EB3467D6
> ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
> gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
>
I never used echo rm -rf. It is an interesting idea. I always prefix
my rm commands with pwd, so that I know exactly where I am, as opposed
to where I THINK I am.
Posted by: Michael <msulli1355@gmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (19) |
No comments:
Post a Comment