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. thanks, Pádraig.
