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

2021-01-18 Thread Paul Eggert
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,

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

2021-01-18 Thread Paul Eggert
On 1/18/21 2:53 AM, L A Walsh wrote: Except that 'find DIR -depth -type d -exec rmdir {} +' is anything but simple and not something anyone outside of a minority of *nix users would have a clue about how to create, whereas 'rmdir -r DIR' is both direct and simple and more easily understandable

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

2021-01-18 Thread Pádraig Brady
On 18/01/2021 20:15, L A Walsh wrote: 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

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

2021-01-18 Thread Ulf Zibis
Am 18.01.21 um 11:53 schrieb L A Walsh: Except that 'find DIR -depth -type d -exec rmdir {} +' is anything but simple and not something anyone outside of a minority of *nix users would have a clue about how to create, whereas 'rmdir -r DIR' is both direct and simple and more easily

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

2021-01-18 Thread L A Walsh
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

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

2021-01-18 Thread L A Walsh
Except that 'find DIR -depth -type d -exec rmdir {} +' is anything but simple and not something anyone outside of a minority of *nix users would have a clue about how to create, whereas 'rmdir -r DIR' is both direct and simple and more easily understandable by those who know how to remove a

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

2021-01-17 Thread Paul Eggert
On 1/16/21 4:29 PM, L A Walsh wrote: Yes, you could do it some other way, like by using 'find' That's what I'd do, yes. 'find DIR -depth -type d -exec rmdir {} +'. I doubt whether it's worth hacking on this at the C level (complicating the documentation too) when there's such a simple and

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

2021-01-16 Thread L A Walsh
Every once in a while, I want to remove what I believe to be an empty directory tree, safely. I wondered, why not have rmdir have a recursive option that would remove all directories under a given directory, presuming they were empty. That way I can try to remove the tree, removing what it can,