Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic

Have you ever run rm -rf / or similar?
Yes.  22%  [ 30 ]
Yes. Once.  20%  [ 27 ]
No.  56%  [ 75 ]
What's rm? Is that like the recycle bin in Windows?  2%  [ 3 ]
Total votes : 135
Author Message
 Post subject: rm -rf /
PostPosted: Sun Sep 14, 2008 7:32 pm 
Offline
Junior Member
User avatar

Joined: Wed Mar 19, 2008 10:34 pm
Posts: 32
Website: http://www.claws-and-paws.com/
WLM: doug.muth@gmail.com
Yahoo Messenger: dmuthathome
AOL: Dmuth+At+Home
Location: Ardmore, PA
I'm just curious as to who has made this classic admin mistake before.

Me personally, I haven't done that, but some years ago I once did a "mv * root" while in the root directory. That moved *everything* into the root user's home directory. At that point my system was completely hosed, because trying to run ls would throw errors about not being able to load the libc libraries out of the (now moved) /lib directory.

It was a fresh install, and this was back in the days when Linux rescue boot disks didn't really exist (mid-90s), so I ended up just reinstalling. :P


Top
   
 Post subject:
PostPosted: Sun Sep 14, 2008 11:01 pm 
Offline
Senior Member
User avatar

Joined: Tue Aug 17, 2004 11:37 pm
Posts: 262
Website: http://www.our-lan.com
WLM: nf@our-lan.com
Location: Brisbane, Australia
In my early linux type days, before i learnt to MAN everything that was suggested to me.. I was in a help channel trying to stop RM prompting me to y/n every file..

Someone jokily said Alias rm='rm -rf /' and me in my new egerness to try did it.. Consiquently my system went down pretty quickly.. Learnt that lesson :)

_________________
ServerAdmin - www.our-lan.com
"Diplomacy is the art of saying nice doggy whilst looking for a really big stick"
"In my experiece, any attempt to make any system idiot proof will only challenge God to make a better idiot"


Top
   
 Post subject:
PostPosted: Sun Sep 14, 2008 11:44 pm 
Offline
Senior Member

Joined: Sun Nov 14, 2004 6:37 pm
Posts: 138
Website: http://oldos.org
WLM: jasonlfaulkner@hotmail.com
Yahoo Messenger: jasonfncsu
AOL: jaylfaulkner
Location: NC, USA
The worst I've done is in my homedir, a

Code:
rm -rf * php


Yeah. That sucked. :(

_________________
Jay Faulkner
http://oldos.org


Top
   
 Post subject:
PostPosted: Mon Sep 15, 2008 11:20 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
"rm -rf /" is a standard command to run at the end of a training course; let's see how well the OS will kill itself :-)

Solaris does pretty well. HP/UX 10.20 would refuse to delete lots of stuff. Windows XP equivalent would barf pretty quickly.

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Mon Sep 15, 2008 11:57 am 
Offline
Senior Member
User avatar

Joined: Tue Jan 04, 2005 7:32 am
Posts: 277
Website: http://www.betadome.com/
Location: Ă…lesund, Norway
Skype: neonnero
Twitter: neonnero
Hmmm... I'm actually considering setting up a virtual machine with Linux and run that command, just to see how things grind to a halt.


Top
   
 Post subject:
PostPosted: Mon Sep 15, 2008 12:04 pm 
Offline
Junior Member
User avatar

Joined: Wed Mar 19, 2008 10:34 pm
Posts: 32
Website: http://www.claws-and-paws.com/
WLM: doug.muth@gmail.com
Yahoo Messenger: dmuthathome
AOL: Dmuth+At+Home
Location: Ardmore, PA
NeonNero wrote:
Hmmm... I'm actually considering setting up a virtual machine with Linux and run that command, just to see how things grind to a halt.


I'd love to see a video of that. :lol:

That reminds me, I once tried doing a kill -9 1 (the init process) to see what would happen. Turns out init is apparently resistant to all signals. Heh.


Top
   
 Post subject:
PostPosted: Mon Sep 15, 2008 3:27 pm 
Offline
Senior Member

Joined: Wed Apr 11, 2007 8:23 pm
Posts: 76
I rdiffed backwards once. That was a mess. Ended up having to boot Finnix and fix stuff.


Top
   
 Post subject:
PostPosted: Mon Sep 15, 2008 7:26 pm 
Offline
Junior Member

Joined: Fri Jun 27, 2008 12:24 am
Posts: 31
I never ran 'rm -rf /' by accident but have done it intentionally.

My worst screw up was when my default PXE config was to run a tools menu with the default being a DBAN autonuke session. I was testing some new systems and didn't realize they were set to boot first over the network and ended up destroying them before I even realized it was happening. I wept quietly in the corner for a few minutes. It all worked out well though as it gave me a chance to do it again and to do it better.

For the record, I still have DBAN autonuke set as my default PXE profile because I never did get around to changing it.


Top
   
 Post subject:
PostPosted: Tue Sep 16, 2008 1:54 pm 
Offline
Junior Member

Joined: Fri Mar 05, 2004 12:30 am
Posts: 39
ICQ: 181450
Website: http://tkatch.com
AOL: TMHChacham
Location: Oak Park, MI
IIRC, back on "Slackware 95", i was trying to rm a local dir. It must have been usr or lib. Out of habit i hit the solidus first and hosed my system. Almost as bad as when i tried upgrading from libc5 to libc 6 manually.


Top
   
 Post subject:
PostPosted: Tue Sep 16, 2008 3:44 pm 
Offline
Senior Member
User avatar

Joined: Thu Jun 21, 2007 7:13 pm
Posts: 100
Website: http://neo101.org
I've done rm -rf ./* while thinking I was in a particular directory but painfully realizing I was in the wrong one. It has never been the root dir yet though.

A friend of mine just learned about file permissions and did a "chmod 000 /* -R" to secure his system. "It took a while to finish, and then I got loads of error messages when trying to do anything. How do I restore the previous permissions?" :).


Top
   
 Post subject: Re: rm -rf /
PostPosted: Tue Sep 23, 2008 2:56 pm 
Offline

Joined: Tue Sep 23, 2008 2:51 pm
Posts: 1
dmuth wrote:
Me personally, I haven't done that, but some years ago I once did a "mv * root" while in the root directory. That moved *everything* into the root user's home directory. At that point my system was completely hosed, because trying to run ls would throw errors about not being able to load the libc libraries out of the (now moved) /lib directory.


Actually, it's not too hard to fix that, at least on most systems. Don't know about your 90's vintage system.

Just do (for example):

LD_LIBRARY_PATH=/root/lib /root/lib/ld-linux.so.2 /root/bin/mv /root/* /

Basically, you just have to tell it explicitly where everything is, since none of it is where it's supposed to be.


Top
   
 Post subject:
PostPosted: Tue Sep 23, 2008 3:21 pm 
Offline

Joined: Tue Sep 23, 2008 3:13 pm
Posts: 1
Website: http://aaronpk.net
I did that once. Intentionally, as I was about to decommission a VPS from a different hosting company. It was actually rather anti-climactic. I did remember to do rm -rfv / so that I could watch its progress! After a while I got back to the shell prompt, and of course I couldn't run any commands. I don't know though,
Code:
-bash: ls: command not found

wasn't as exciting as I had hoped. I was kinda expecting to see sparks or something.


Top
   
 Post subject:
PostPosted: Tue Sep 23, 2008 3:25 pm 
Offline
Junior Member
User avatar

Joined: Wed Mar 19, 2008 10:34 pm
Posts: 32
Website: http://www.claws-and-paws.com/
WLM: doug.muth@gmail.com
Yahoo Messenger: dmuthathome
AOL: Dmuth+At+Home
Location: Ardmore, PA
aaronpk wrote:
Code:
-bash: ls: command not found

wasn't as exciting as I had hoped. I was kinda expecting to see sparks or something.


I don't know about sparks, but if you cat /vmlinux to /dev/audio, you'll hear the voice of God!


Top
   
 Post subject: Re: rm -rf /
PostPosted: Tue Sep 23, 2008 3:49 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
dmadole wrote:
LD_LIBRARY_PATH=/root/lib /root/lib/ld-linux.so.2 /root/bin/mv /root/* /


This is a glibc feature and thus present on most Linux systems which use glibc. Other operating systems may not (probably don't) have this functionality.

_________________
Rgds

Stephen

(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Tue Oct 14, 2008 3:38 pm 
Offline
Junior Member

Joined: Mon Jun 27, 2005 3:40 am
Posts: 48
friend of mine did this by accident on his old slackware box at his house one day years ago (2000ish?)

He had qmail running and was cleaning out some directories for the queues....

he was a noob to scripting then so he was doing rm -rf a/ (enter) rm -rf b/ (enter)


eventually it came to rm -rf / d (enter)

took a few seconds.. he stared at it

"NOOOO!" *SLAM CONTROL C*

deleted everything up to /dev then stopped.

he sighed, saw his home directories etc were safe and went to go reinstall everything else.

"shutdown -r now"

but because passwd was gone, uid 0 didnt exist anymore. Linux had and has some very interesting error messages

told him and i shit you not "You do not exist here. Go away."


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group