Dangers of remove command

Gilles Gravier ggravier at fsfe.org
Sat Jul 7 12:39:59 UTC 2012


Hi!


On 07/07/2012 10:48, Nolan wrote:
> Danger.. `rm*' and not verifying backups.
>
> http://www.ubuntuvibes.com/2012/05/pixars-toy-story-2-was-nearly-lost.html

When I was a system administrator, ages ago, I was doing some cleaning
up on the system.

So I typed (as root) : rm -rf /tmp/*

Unfortunately, that's what I *THOUGH* I had typed.

What I actually typed was : rm -rf /tmp /*

(note the somewhat inconspicious space character between /tmp and /*)

After a few long seconds of me thinking "Gosh, that's a LOT of files in
/tmp to delete" I re-read the screen again... and realized the mistake.

By that time, /bin, /etc, were all gone. And /usr was mostly in shreds
as well.

That was THE only machine that the whole branch was running on (at the
time, you could run 20 people on a single desk-side machine, in my case
a Data General AViiON running DG-UX).

And to re-install the full machine, it was about 15 different QIC-150
tapes to individually re-install. Fortunately, home directories were not
touched.

Learned my lesson. Proof-read every single potentially destructive
command you type... twice.

Gilles.




More information about the ubuntu-users mailing list