[comp.unix.questions] is sinix rm -r * different ?

ruediger@ramz.UUCP (Ruediger Helsch) (07/04/90)

In article <1990Jun20.073620.15486@diku.dk> nomann@rimfaxe.diku.dk (Ole Nomann Thomsen) writes:
>Recently, I heard about some poor superuser, that tried to delete all of
>a users files by cd'ing to the users $HOME and "rm -r *"'ing. This
>producede more than the desired result, since his `*' expanded to `.' and
>even `..' too. ("Gurfle" to cite the hackers jargon posings).

Happened simailarly to me. One evening I was in a hurry removing files on /tmp.
I typed "rm -rf *", but a listing showed me that there were some files
(beginning with '.') not removed. So i repeated "rm -rf .*". I waited for a
response, and after maybe 15 seconds i became suspicious something might go
wrong. I aborted with ^C, but too late. I typed "ls", and the answer was
"ls: command not found". The /bin directory was already gone. It was going
to be a long night.

gary@sci34hub.UUCP (Gary Heston) (07/05/90)

In article <1523@ramz.UUCP> ruediger@ramz.UUCP (Ruediger Helsch) writes:
=In article <1990Jun20.073620.15486@diku.dk> nomann@rimfaxe.diku.dk (Ole Nomann Thomsen) writes:
=>Recently, I heard about some poor superuser, that tried to delete all of
=Happened simailarly to me. One evening I was in a hurry removing files on /tmp.
=I typed "rm -rf *", but a listing showed me that there were some files
=(beginning with '.') not removed. So i repeated "rm -rf .*". I waited for a
=response, and after maybe 15 seconds i became suspicious something might go
=wrong. I aborted with ^C, but too late. I typed "ls", and the answer was
="ls: command not found". The /bin directory was already gone. It was going
=to be a long night.

I have to deal with a lot of leftover files beginning with "...", and
have formed the habit (for files beginning with ".") of using 
".[a-zA-Z]*" as the argument. I avoid using the -r option if at all
possible, using "find . -print | xargs rm" for the files and a second
pass to get the directories. Haven't wiped out /bin yet, doing that.

Someone else here did a "su -" when he needed to compress some files
(owned by root) in a directory, followed by "find . -print | 
xargs compress"..... compressed /bin, /usr/bin, /etc, and so on
real well. Had to boot from tape, put on an uncompressed copy
of compress, and clean up....


-- 
    Gary Heston     { uunet!sci34hub!gary  }    System Mismanager
   SCI Technology, Inc.  OEM Products Department  (i.e., computers)
"The esteemed gentleman says I called him a liar. That's true, and I
regret it." Retief, a character created by Keith Laumer.