Re: [patch] rm can have undesired side-effects



On Mon, Oct 30, 2006 at 01:05:06PM -0800, Doug Barton wrote:
Simon L. Nielsen wrote:

Personally I think rm should do what you ask it to do - if you ask it
to overwrite a file which has multiple links, well... though luck.

Sorry, I disagree. It's not always obvious to the user when a file has
hard links, and I can't see any situation where the pre-recent-patch
behavior (overwriting the actual file when using -P on a hard link) is
the expected outcome.

It's all well and good to say, "tough luck," but I don't think that's
what our users expect.

How do you know what is "obvious to the user" and what "users expect"?
Have you done some surveys or researches? If not, than it is all relative
and happening inside _your_ head.

To speak in facts: How many users do you know that have complained about
rm(1)'s behavior before this thread was started (I mean the -P switch
when file has multiple links)? Or have lost their valuable data because
of "rm -P"-ing their files?

IMHO many problems arise when someone tries to please even the stupidest
user by writing a fool-proof software. To me the beauty of Unixes is
that they are _not_ fool-proof, e.g. your are holding a real gun, you
should be carefull not to point it to your head and pull the trigger.

--
Vasil Dimov
gro.DSBeerF@dv
%
Shaw's Principle:
Build a system that even a fool can use, and only a fool will
want to use it.

Attachment: pgp6mIHyvbM5e.pgp
Description: PGP signature



Relevant Pages

  • Re: [patch] rm can have undesired side-effects
    ... to overwrite a file which has multiple links, ... though luck. ... Independent Network/Unix/Perforce consultant, email for more information. ...
    (freebsd-hackers)
  • Re: [patch] rm can have undesired side-effects
    ... On Monday 30 October 2006 01:17 pm, Mike Meyer wrote: ... it to overwrite a file which has multiple links, ... It's all well and good to say, "tough luck," but I don't think that's ...
    (freebsd-hackers)
  • RE: pulled down navigation bar
    ... Good Luck ... > would like to have the mouse over option be able to pull ... > down multiple links under one link on the navigation bar. ...
    (microsoft.public.frontpage.client)
  • Re: [patch] rm can have undesired side-effects
    ... to overwrite a file which has multiple links, ... Sorry, I disagree. ... hard links, and I can't see any situation where the pre-recent-patch ... It's all well and good to say, "tough luck," but I don't think that's ...
    (freebsd-hackers)
  • Re: Time Machine and hard links
    ... What does it do if you have hard links in your data? ... If you restore a ... directory containing multiple links to a file, ... The programmers could write it either way. ...
    (uk.comp.sys.mac)