GNU bug report logs - #45924
RFE: rmdir -r: recursively remove [empty] directories under the target.

Previous Next

Package: coreutils;

Reported by: L A Walsh <coreutils <at> tlinx.org>

Date: Sun, 17 Jan 2021 00:31:01 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>, L A Walsh <coreutils <at> tlinx.org>, 45924 <at> debbugs.gnu.org
Subject: bug#45924: RFE: rmdir -r: recursively remove [empty] directories under the target.
Date: Mon, 18 Jan 2021 21:18:09 -0800
[Message part 1 (text/plain, inline)]
On 1/18/21 8:08 AM, Bernhard Voelker wrote:
> On 1/17/21 11:18 PM, Paul Eggert wrote:
>> find DIR -depth -type d -exec rmdir {} +
> 
> find(1) can also find empty directories and delete them:
> 
>    $ find DIR -type d -empty -delete

Thanks, I'd forgotten about that.

I added the attached to the manual, as the point seems worth documenting 
even if we don't change the code.
[0001-doc-rmdir-recursive-substitutes.patch (text/x-patch, attachment)]

This bug report was last modified 3 years and 115 days ago.

Previous Next


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