Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 2006 23:57:45 -0000
From:      "Steven Hartland" <killing@multiplay.co.uk>
To:        "Joerg Pernfuss" <elessar@bsdforen.de>, <freebsd-hackers@freebsd.org>
Subject:   Re: [patch] rm can have undesired side-effects
Message-ID:  <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk>
References:  <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
 
----- Original Message ----- 
From: "Joerg Pernfuss" <elessar@bsdforen.de>
>> I guess that it can be fixed (in case it is not desired) by:
>>  - Ignoring the -P option when the link count is greater then one, or
>
> Silently ignoring user specified options is seldom a good way to go.
> The user explicitly stated he wants to wipe the file contents.

That maybe the case but does rm -f <file> remove all copies?
Nope so its behaviour is safe even with multiple hardlinks.

>From the description I've seen thats not the case for -P
here and as such I dont think its quite a simple as that.

My personal preference would be for it to warn or perhaps
error if the link count is not zero. Possibly use -f to
override this but even that I'd say is dangerous.


================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster@multiplay.co.uk.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00f201c6fbb6$0c6bd150$b3db87d4>