Bonehead Move

Cameron Simpson cs at zip.com.au
Wed Feb 14 02:06:15 UTC 2007


On 13Feb2007 20:39, linuxmaillists at charter.net <linuxmaillists at charter.net> wrote:
| On Tuesday 13 February 2007, Frank Cox wrote:
| > On Tue, 13 Feb 2007 19:25:41 -0500
| >
| > Tod <tod at stthomasepc.org> wrote:
| > > Thus I ended up doing rm -fr ./ mydir.  Goodbye home
| > > dir.
| >
| > Create a file named -i in your home directory to prevent
| > this from happening in the future.
| 
| How does this prevent that happening?

In short, it doesn't.

What it does do is help with "rm *" or the like. The "-i" will be included
in the expansion of "*", fortuitously at the front. And so rm's -i mode
will kick in and you'll be asked to confirm.

Tip for the unwary: the most common single keystroke error is pressing
<return>. I habitually pause, briefly, before pressing return to eyeball
important commands like rm.

It wouldn't have helped the OP, because the <return> as (presumably)
included in his paste...
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

I am returning this otherwise good typing paper to you because someone has
printed gibberish all over it and put your name at the top.
        - English Professor, Ohio University




More information about the users mailing list