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

From: Linda Walsh <[email-masked]>
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