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 #39 received at 21084 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Paul Eggert <eggert <at> cs.ucla.edu>, Linda Walsh <coreutils <at> tlinx.org>
Cc: 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, 2 Aug 2015 22:31:16 +0200
On 08/02/2015 10:15 AM, 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'.

+1

Adding additional code to find out if the file to remove is still on the
same file system would add bloat, and would open another can of worms:
corner cases, races and a big performance penalty.  E.g. one might blindly
assume that only directories are mount points, but in reality also a
regular file can be 'over-mounted'.

Have a nice day,
Berny






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.