GNU bug report logs - #12339
Bug: rm -fr . doesn't dir depth first deletion yet it is documented to do so.

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Mon, 3 Sep 2012 00:34:02 UTC

Severity: normal

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #155 received at 12339 <at> debbugs.gnu.org (full text, mbox):

From: Linda Walsh <coreutils <at> tlinx.org>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, Jim Meyering <jim <at> meyering.net>,
	"12339 <at> debbugs.gnu.org" <12339 <at> debbugs.gnu.org>
Subject: Re: bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it
	is	documented to do so.
Date: Thu, 06 Sep 2012 10:40:38 -0700

Bernhard Voelker wrote:
> 
> 
> On September 6, 2012 at 12:56 PM Linda Walsh <coreutils <at> tlinx.org> wrote:
> 
>> Jim Meyering wrote:
>>> Thanks for the patch, but it would be pretty rotten for GNU rm to make
>>> it so "rm -rf ." deletes everything under ".", while all other vendor
>>> rm programs diagnose the POSIX-mandated error.  People would curse us
>>> for making GNU rm remove their precious files when they accidentally ran
>>> that command.
>> ---
>>
>> Just like people who ran "rm -fr * in /" and didn't get their POSIX
>> mandated behavior, would curse you?
>>
>> You are playing Mommy, to people and not allowing them to do what
>> they are asking the computer to do.
>>
>> [... and ~40 lines re. Jim, GNU, POSIX, the universe ...]
> 
> Dear Linda,
> 
> why don't you stick to the point?
----
	I wasn't the one who raised the point of people
cursing Gnu for removing their precious when they accidently or deliberately
tried to invoked rm in a way to generate a non-functional behavior.

	If we were going to talk about them cursing gnu, I thought
I would fully put it in perspective.

	That's what that exposé was about.

	Note -- that it wasn't personally directly, and included listed
facts for a stronger counterpoint to what, admittedly, was likely a lightly
given reason for not changing a default behavior.  It was addressing
that comment, alone.

	You want an on-point counter proposal:

	Might I suggest this as a rational counter proposal.


	If the user issues rm -r ., it issues a warning:

"Do you really wish to remove all files under '.'"?

	That won't break compatible behavior.  Only if the user chooses
the non-default 'force' option "do what I say and shut up", which is not
a default option", would it do the action I suggest.

	In any case, if POSIX_CORRECTLY is set, it will act as per POSIX requirements.

	It is TELLING, and important to understand Jim's statement
" Very few people ever set that envvar."  Most people don't want strict POSIX
compatbility -- for reasons exactly like this -- the POSIX isn't about 
usability, it's
about program portability.  So for interactive use, it wouldn't be something most
people would want to use.








This bug report was last modified 6 years and 187 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.