HP3000-L Archives

November 2001, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Wayne Brown <[log in to unmask]>
Reply To:
Date:
Wed, 14 Nov 2001 17:13:27 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (78 lines)
To avoid that scenario, I have a practice on every Unix (or Linux) system I
administer.  I create a zero-byte file called -i in the root directory (and in
other critical directories).  Because punctuation comes ahead of letters and
numbers in the ASCII collating sequence, this file shows up first in the
directory listing.  Typing rm -rf * in a directory containing this file causes
the shell to pass the -i ahead of the other file names.  The rm command
interprets the -i as an option, not as a file name, and this option tells it to
ask for confirmation before deleting anything.

Some people just alias "rm" as "rm -i" to get the same effect, but I prefer my
method because it only asks for confirmation if I use * for the file list.
Plus, I can override even that behavior by typing rm -rf ./* if for some reason
I really WANT to delete everything.

Wayne




Charles Finley <[log in to unmask]> on 11/14/2001 04:57:14 PM

Please respond to Charles Finley <[log in to unmask]>

To:   [log in to unmask]
cc:    (bcc: Wayne Brown/Corporate/Altec)

Subject:  Re: [HP3000-L] "rm -rf *"  and other nice UNIX features - Errata



In order to really destroy everything you'd need "rm -rf *".  It's way too
easy to hit that send button after I'm done typing e-mail.

Charles Finley
Transformix Computer Corporation
1832 Bailey Dr.
Oceanside, CA  92054
(760) 439-3146


> -----Original Message-----
> From: Charles Finley [mailto:[log in to unmask]]
> Sent: Wednesday, November 14, 2001 2:41 PM
> To: HP 3000-L
> Subject: "rm *" and other nice UNIX features
>
>
> For those of you who don't get the "joke".  Entering the
> following sequence of commands on a UNIX system can lead to more
> excitement than you ever wanted in your life.
>
> login: "root"
> Password:"dumb"
>
> WARNING:  YOU ARE SUPERUSER !!
>
> # "cd /"
> # "rm *"
>
> This little set of commands when entered by the UNIX equivalent
> of Manager.sys the "root" user wipes out your entire directory structure.
>
> I was wondering if anyone would be interested in a UNIX for MPE
> user's workshop.
>
> Charles Finley
> Transformix Computer Corporation
> 1832 Bailey Dr.
> Oceanside, CA  92054
> (760) 439-3146
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2