GNU bug report logs - #21084
rm appears to no longer be POSIX compliant (as of 2013 edition) re: deleting empty dirs and files under <path>/.

Previous Next

Package: coreutils;

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

Date: Sat, 18 Jul 2015 07:57:01 UTC

Severity: normal

Tags: notabug

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


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

From: Linda Walsh <coreutils <at> tlinx.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Bernhard Voelker <mail <at> bernhard-voelker.de>,
 Andreas Schwab <schwab <at> linux-m68k.org>, 21084 <at> debbugs.gnu.org
Subject: Re: bug#21084: rm appears to no longer be POSIX compliant (as of
 2013	edition) re: deleting empty dirs and files under <path>/.
Date: Sun, 02 Aug 2015 18:37:43 -0700

Paul Eggert wrote:
> Linda Walsh wrote:
>> find, by itself, has no way to remove all of the items under a
>> tree even if you own them all.
> 
> That's not a problem.  Have 'find' call 'rm'.  Something like this, say:
> 
> find . ! -name . -prune -exec rm -fr {} +
> 
> So there's no need to change 'rm'.
----
Bernard is worried about performance.  Do you know how long it would take 
for find to call rm? a half-a-million times?
Um....

> time rm -fr . 
183.23sec 0.69usr 36.25sys (20.16% cpu)
> time find . ! -name . -prune -exec rm -fr {} +
219.58sec 0.87usr 40.81sys (18.98% cpu) -- about 36 seconds (~20%) longer

So you've already slowed things down -- and those times were just for my home 
directory...!   (non-critical data was used for these tests (copies
of my home directory that existed on different partitions))

But you also didn't address points (3), (4) or (5)..

-.5






This bug report was last modified 9 years and 297 days ago.

Previous Next


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