Re: rm -r /usr/local by mistake

From: Robert Bonomi (bonomi_at_host122.r-bonomi.com)
Date: 06/14/05


Date: Tue, 14 Jun 2005 17:03:57 -0000

In article <slrndaslmb.12st.cmenzel@philebus.tamu.edu>,
Chris Menzel <cmenzel@remove-this.tamu.edu> wrote:
>On Tue, 14 Jun 2005 03:05:01 GMT, Bill Vermillion <bv@wjv.com> said:
>> In article <slrndardh3.12st.cmenzel@philebus.tamu.edu>,
>> Chris Menzel <cmenzel@remove-this.tamu.edu> wrote:
>>>On Sun, 12 Jun 2005 21:52:16 -0400, Chris F.A. Johnson
>>><cfajohnson@gmail.com> said:
>>>> On 2005-06-12, Chris Menzel wrote:
>>>>> On 12 Jun 2005 11:34:14 -0700, de08 <de08jze@lycos.de> said:
>>>>>> I did a stupid mistake and deleted (of courdse rm -r )the folder
>>>>>> /usr/local/ on 5.4-RELEASE FreeBSD.
>>>>
>>>>> You might might consider aliasing "rm" to "rm -i" so you get a warning
>>>>> before you blow a dir away. You can always avoid the warning with
>"\rm -i"
>>>>> if you're sure.
>>>>
>>>> I would suggest that that is more dangerous than anything. Relying
>>>> on non-standard behaviour, which may not be in effect on another
>>>> user's login, or on another machine, is asking for trouble.
>>
>>>I withdraw the suggestion. Arguably, rm's default behavior should have
>>>been that of "rm -i"; but it's not, so point taken.
>>
>> I disagree on that. rm should not default to -i. You just have to
>> remember the power of rm.
>
>I'm willing to be convinced otherwise, but I guess I don't see much
>difference between remembering its power, given rm's current behavior,
>and remembering a flag to get the same effect (were rm to default to
>-i).

One of the basic design tenets of UNIX is that you do scripts with *exactly*
the came commands that you use from the command-line.

_Any_ caommand that defaulted to an 'interactive' mode would violate that
premise. The _real_ 'vi' *can* be run from a cron job, with a here-document
as input -- many of the 'clones', e.g. 'nvi' will bitch and shutdown if
'stdout' is not an actual tty device. 'nvi' _is_ a botch in this respect.

There is _nothing_wrong_ with having a 'defanged' varient of rm(1) around;
just call it something different; 'del', maybe. If you try to use it,
where it doesn't exist, you'll get a warning message, rather than 'unexpected'
behavior.



Relevant Pages

  • Re: Delay on a mains-powered relay?
    ... The whole idea of technology in industry is to make the ... No, no 'remembering' required. ... When you apply power, the clock motor winds ...
    (sci.electronics.repair)
  • Re: Delay on a mains-powered relay?
    ... The whole idea of technology in industry is to make the ... No, no 'remembering' required. ... When you apply power, the clock motor winds ...
    (sci.electronics.design)
  • Re: Cat-6506 Sup 720 and FWSM
    ... reinsertion I can not get it to accecpt any hw-module reset commands. ... Sounds like a power or fan problem. ... You can't reset a blade that is not powered up, ...
    (comp.dcom.sys.cisco)
  • Re: Sony WEGA KE-P42XS1 will not boot up
    ... commands that you used to get in to the service mode?? ... Your best bet is to take the set to the authorized Sony service rep for your ... If the set is more than about 3 years old, the replacement EPROM may ... I decided to stop everything and power down the TV ...
    (sci.electronics.repair)
  • Re: OT Power
    ... Our home power has only flickered, ... FIT (Florida Institute of Tech) has cancelled all classes and ... to Miami has shut down and probably won't go back on for about 10 hrs. ... remembering right, that probably will effect Boca Jan and Annabelle. ...
    (rec.crafts.textiles.quilting)