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: L A Walsh <coreutils <at> tlinx.org>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 45924 <at> debbugs.gnu.org
Subject: bug#45924: RFE: rmdir -r: recursively remove [empty] directories under the target.
Date: Mon, 18 Jan 2021 12:15:26 -0800

On 2021/01/18 08:08, Bernhard Voelker wrote:

> find(1) can also ... [various examples of find's usefulness elided]
> Have a nice day,
> Berny
===
	As I stated in the original message:

On 2021/01/16 16:29, L A Walsh wrote:
> Yes, you could do it some other way, like by using 'find',
> but since it is about removing directories, having the option
> under rmdir would seem a natural place to put it.

Thank you Bernhard, but numerous ways to do it with find don't 
really have the simplicity, of using "remove dir" for its
"raison d'ĂȘtre":

 rmdir -r DIR

 vs. find:

 find DIR -depth -type d -exec rmdir {} +


One could also use find to implement recursive file removal instead of
using 'rm', but that's hardly simple or straightforward as "rm -r"
either.









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.