On Sun, 01 Feb 2015, Pádraig Brady wrote:
> On 01/02/15 02:19, Yaroslav Halchenko wrote: > > ATM (Debian jessie/sid with coreutils 8.23-3): > >> mkdir -p d1/d2; touch d1/d2/f1; chmod -w d1/d2; rm -rf d1 > > rm: cannot remove ‘d1/d2/f1’: Permission denied > > so to 'rm -rf d1' I need first to chmod +w all directories... although at > > times > > fs not really an issue, but I am testing git-annex repositories with up to a > > million of files. Thus running both first recursive chmod and then rm -r > > sounds (and feels) quite wasteful. So I wondered to suggest/ask if > > implementing alternation of the parent's directory permissions if --force > > would > > be provided be a sensible extension to rm? > > PS Please CC me -- I am not on the list > This was previously discussed at: > http://lists.gnu.org/archive/html/bug-coreutils/2003-11/msg00058.html > From my point of view, adding a new flag would essentially > be combining chmod(1) and rm(1) functionality for no functional gain > (no extra atomicity for example). It might have some performance > benefits, but I don't think that's significant enough here. Thank you Pádraig -- indeed quite an old issue! Well -- even if there is no "functional gain", as it is a reoccurring question, and hopefully there is a growing number of git-annex users, it might be a quite useful usability feature for some of us. As for performance -- I expect it to be quite of significant gain (didn't patch/time it yet) on large directories structures. Just My 1c for now. May be I would come up with a patch later and provide quantitative assessment of a performance benefits here (not to mention the convenience of using 1 command instead of two). Cheers! -- Yaroslav O. Halchenko, Ph.D. http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org Research Scientist, Psychological and Brain Sciences Dept. Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755 Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419 WWW: http://www.linkedin.com/in/yarik
