bug#6402: [PATCH] rm: added --directory (-d) option (original) (raw)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
From: | Eric Blake |
---|---|
Subject: | bug#6402: [PATCH] rm: added --directory (-d) option |
Date: | Fri, 11 Jun 2010 09:13:19 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Mnenhy/0.8.2 Thunderbird/3.0.4 |
On 03/07/2010 12:47 PM, address@hidden wrote:
Hello again,
Hello,
Sorry for the long delay in reading through my inbox. It looks like this was written before we moved to the debbugs interface, making it easier to lose in the mists of time; but now that I am responding, it will get an id number to help us remember it.
I have finally completed my --directory (-d) feature, like the FreeBSD one.
Well, first, I would need to understand if there is any difference between 'rmdir dir' (specified by POSIX) and 'rm -d dir' - if they are no different, then how do you justify the extension? But, since there are other implementations out there that do it, it might be nice to support, if only so GNU tools can serve as drop-in replacement for vendor tools.
The directory option deletes a directory only if the directory in question is empty. This is a safer alternative to the recursive option is some cases where you don't want to delete unempty directories.
I have documented the features. Although I am not the best technical writer, I hope that what I have done is adequate. One thing that I have neglected to do, intentionally, is to write an automated test. I am not skilled enough or confident enough in my Perl or shell scripting ability to write such a test.
Thanks very much for submitting a patch, and especially for including documentation as part of the patch. If others on this list agree that this is worth having, there's still one hurdle to jump through - your patch is too long to be considered trivial, so you would have to assign copyright to the FSF, or else we would have to reimplement the patch from scratch based on your description. I have not looked at your patch, for that reason. Let us know if this is still something you are willing to pursue.
I would love to hear what I could have done better, or possibly what I have done wrong. Any comments on my code are very much appreciated. That is a big part of why I am doing this is to become a better programmer.
Thank you, and with out further ado, here is the patch.
-- Eric Blake address@hidden +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- bug#6402: [PATCH] rm: added --directory (-d) option,Eric Blake <=
- bug#6402: [PATCH] rm: added --directory (-d) option, Paul Eggert, 2010/06/15
* bug#6402: [PATCH] rm: added --directory (-d) option, Jim Meyering, 2010/06/15
- bug#6402: [PATCH] rm: added --directory (-d) option, Paul Eggert, 2010/06/15
- Prev by Date:bug#6131: [PATCH]: fiemap support for efficient sparse file copy
- Next by Date:bug#6131: [PATCH]: fiemap support for efficient sparse file copy
- Previous by thread:bug#6398: [PATCH] build: don't let a large sparse temporary file cause "make dist" to fail
- Next by thread:bug#6402: [PATCH] rm: added --directory (-d) option
- Index(es):