Re: rm -r /usr/local by mistake
From: Robert Bonomi (bonomi_at_host122.r-bonomi.com)
Date: 06/14/05
- Next message: Keve Nagy: "Re: how do I refer to my disk in devd.conf"
- Previous message: Wolfgang.Schelongowski_at_gmx.de: "Re: rm -r /usr/local by mistake"
- In reply to: Chris Menzel: "Re: rm -r /usr/local by mistake"
- Next in thread: Chris Menzel: "Re: rm -r /usr/local by mistake"
- Reply: Chris Menzel: "Re: rm -r /usr/local by mistake"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Keve Nagy: "Re: how do I refer to my disk in devd.conf"
- Previous message: Wolfgang.Schelongowski_at_gmx.de: "Re: rm -r /usr/local by mistake"
- In reply to: Chris Menzel: "Re: rm -r /usr/local by mistake"
- Next in thread: Chris Menzel: "Re: rm -r /usr/local by mistake"
- Reply: Chris Menzel: "Re: rm -r /usr/local by mistake"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|