[alt.folklore.computers] rm *

leilabd@syma.sussex.ac.uk (Leila Burrell-Davis) (01/17/90)

[Sorry if this has been suggested before, I only just noticed this
discussion.]

A simple tip which I picked up somewhere to avoid inadvertent 'rm *'
commands is to have a file called -i in each directory (create with
'touch ./-i'). If you type 'rm *', the first file in the directory
is (almost) certain to be -i, which will be interpreted as a flag to
the command rather than as a filename and will put rm into
interactive mode. I find this a useful safeguard and only very
rarely irritating.
-- 
Leila Burrell-Davis, Computing Service, University of Sussex, Brighton, UK
Tel: +44 273 678390   Fax: +44 273 678335  JANET: leilabd@uk.ac.sussex.syma
INTERNET: leilabd%syma.sussex.ac.uk@nsfnet-relay.ac.uk
BITNET: leilabd@syma.sussex.ac.uk      UUCP: leilabd@syma.uucp

hollombe@ttidca.TTI.COM (The Polymath) (01/17/90)

In article <11037@ucsd.Edu> brian@ucsd.edu (Brian Kantor) writes:
}On an old sun workstation (a 100/U which is still running, thank you
}very much) I once typed rm -rf / & (God, it hurts just to type that in a
}news article!) and realized the error about 10 uSec after hitting the
}return key.  Yanking the power plug out of the wall stopped it before it
}had a chance to write the updated buffers to disk and it suffered no
}loss at all.
}
}I, on the other hand, had a severe laundry problem.

I once did the equivalent on a PDP-11/70 (upgraded from 45) running
RSTS/E.  After a particularly long edit session, I slipped and entered a
DEL * (or equivalent -- 'twas long ago).

The only file in my directory was the one and only copy of my (nearly
completed) master's thesis. )-:

After staring at the screen in horror for about 3 seconds I desperately
hit a control-C. (That would stop just about anything under RSTS/E).  To
my amazement, the delete process stopped.  To my relief, I only had to
retype the first 5 pages of my thesis (from hard copy).

Then I went home, lay down and shook for three hours. (-:

-- 
The Polymath (aka: Jerry Hollombe, hollombe@ttidca.tti.com)  Illegitimis non
Citicorp(+)TTI                                                 Carborundum
3100 Ocean Park Blvd.   (213) 450-9111, x2483
Santa Monica, CA  90405 {csun | philabs | psivax}!ttidca!hollombe

loki@moncam.uucp (Never Kid A Kidder) (01/17/90)

In article <584@celia.UUCP> keith@celia.UUCP (Keith Goldfarb) writes:

   Anyone ever notice that ls uses the '?' character to display
   garbage characters, and the shell takes '?' as a wild card??

   I once worked with someone who did an ls and saw a bunch of
   files that started with "???".  He calmly typed "rm ???*" to
   remove them.

I did this once.  It was the beginning of my second year at
university, and even though I'd been using Bourne shell for a whole
year, I had somehow never encountered the `?'.  It serves me right for
not being inquisitive enough (there was no official teaching of the
shell until the second year, when we were actually taught the
mechanisms used to implement things like pipes, redirection &c.)  Sad
thing was, it was a week's worth of coursework I deleted.  Naturally
they had a backup, so I only lost a day's worth, but at the time, I
was too panicked to think!!!