On 16 Mar 2005, at 20:43, Brian Foster wrote:
> I've never understood why BSD added `-R' to chown(1),
> chmod(1), and chgrp(1) in the first place. that option,
> which I have never liked for several reasons (including
> one which should now be obvious!), did not exist in
> 7th Edition Unix. since find(1) did, the functionality
> was present, but in a form that is less dangerous.
>> rm(1) in Unix of that vintage did have `-r', and _I_
> once did the equivalent of `cd /; rm -rf *' (followed by
> a quick ^C !) --- massively fortunately, late at night
> (which is probably the reason: sleepiness!) c.30mins
> after a full level-0 backup had completed, so all that
> was lost was a few e-mails. but a long night turned
> into a very very loonnnggggg night.... ;-\
>> the `--(no-)preserve-root' is (very probably) a GNU
> invention. the historical, Unix, and maybe POSIX.2
> behaviour is GNUs `--no-preserve-root'. but no matter
> which way it is, you would still have all the other
> problems with the absurd `-R' option, including the
> sort of thing I did: `cd /; chmod -R 777 *'
The only answer to this is Neal Stephenson's classic essay about the
Hole Hawg, which you can read at http://www.team.net/mjb/hawg.html .
The 6th paragraph sums the matter up nicely IMO.
Niall
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!