coreutils
[Top][All Lists]
Advanced

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

Re: [wishlist] rm -rf to alter directories permissions if necessary


From: Pádraig Brady
Subject: Re: [wishlist] rm -rf to alter directories permissions if necessary
Date: Sun, 01 Feb 2015 03:02:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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.



reply via email to

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