bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45924: RFE: rmdir -r: recursively remove [empty] directories under t


From: L A Walsh
Subject: bug#45924: RFE: rmdir -r: recursively remove [empty] directories under the target.
Date: Mon, 18 Jan 2021 12:15:26 -0800
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)



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.










reply via email to

[Prev in Thread] Current Thread [Next in Thread]