From: Keith M. <kei...@us...> - 2011-10-03 19:51:09
|
On 30/09/11 22:51, Earnie Boyd wrote: > On Fri, 30 Sep 2011 21:01:25 +0100, Keith Marshall wrote: >> While I sympathise that a bug in MSYS caused more destruction, as a >> result of your invocation of 'rm -rf ~123install', than it probably >> should have done, you must accept some responsibility for your own >> carelessness, in invoking a potentially destructive command without >> having a proper understanding of the syntax. Your intent may have >> been to expunge a directory called '~123install', but that ISN'T the >> intent expressed by the command you invoked: >> >> $ rm -rf ~123install > > I understand the expansion of ~ and acknowledge that I foolishly used > it without thinking about it I would say carelessly, rather than foolishly; I certainly wouldn't wish to suggest that you were foolish. > however if I had done so in a 'NIX world rm -rf would have sightly > ignored the absence of the file system entry. It would not have > proceeded to attempt to remove files beginning from the root device. That's true, which is why I sympathise that the MSYS bug exacerbated the undesirable outcome. FWIW, I'll often run: $ echo rm -rf <args> ... before running it for real, or maybe even substitute: $ rm -ri <args> ... where I have any doubt as to how the shell might interpret '<args> ...' in a potentially destructive scenario such as running 'rm -r ...'. >> Now, lest I should create an impression of overbearing smugness, let >> me candidly admit that I too could just as easily have made this same >> mistake. There is a lesson here, from which we can all benefit. > > Which is why I brought it up on the list. Ack. I just felt that it needed amplification. -- Regards, Keith. |