[wishlist] rm -rf to alter directories permissions if necessary
From:
Yaroslav Halchenko
Subject:
[wishlist] rm -rf to alter directories permissions if necessary
Date:
Sat, 31 Jan 2015 21:19:12 -0500
User-agent:
Mutt/1.5.21 (2010-09-15)
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
--
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.nethttp://www.pymvpa.orghttp://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