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:
PostPosted: Wed Oct 15, 2008 12:30 am 
Offline
Senior Newbie

Joined: Sat Oct 11, 2008 11:49 am
Posts: 12
Tried this on a VM earlier:
http://zombie-slaughter.co.uk/phpbb3/vi ... ?f=7&t=123

Also, the Windows "equivalent":
http://zombie-slaughter.co.uk/phpbb3/vi ... ?f=7&t=124


Top
   
 Post subject: Once, about 10 years ago
PostPosted: Mon Oct 20, 2008 11:16 pm 
Offline
Junior Member
User avatar

Joined: Sun Oct 02, 2005 11:54 am
Posts: 43
Website: http://www.garyscott.net
Location: Goleta, CA
I was a super noob, although I still consider myself a noob a decade later. I was trying to delete a whole directory and I was trying different commands. I was copy and pasting from a text editor and I accidentally added a space after the /. I knew something was wrong when it took a while to respond and I all of a sudden got file locked errors for some mysql stuff. Luckily there was a backup from the night before.


Top
   
 Post subject:
PostPosted: Mon Oct 20, 2008 11:27 pm 
Offline
Junior Member

Joined: Tue Sep 25, 2007 3:04 pm
Posts: 27
I've never done the classic rm -rf /, but I have done the following:

in Windows, formatted the wrong partition.

With Norton Ghost, ghosted in the wrong direction. You'd be surprised at how easy this is to do with Ghost, considering the only information it gives you is the drive model and capacity. If they're the same drive type and same drive capacity, you can figure out how that can be a pain...

I've actually done the Ghost thing on a couple of occasions. I got better at backing up my ghost image files after that.


Top
   
PostPosted: Tue Oct 21, 2008 8:33 pm 
Offline
Senior Newbie

Joined: Tue Aug 19, 2008 11:08 pm
Posts: 6
Location: Melbourne, AU
On Solaris I always found that the fmthard command was scary. It overwrites a disk toc in one effortless movement. I dont think there is anything in Linux which is that easy...

If rm -rf ever takes longer the 10ms to come back to the shell prompt I instinctively do a control-c.


Top
   
 Post subject:
PostPosted: Sat Dec 20, 2008 6:27 pm 
Offline
Senior Newbie
User avatar

Joined: Sat Dec 20, 2008 5:58 pm
Posts: 5
Website: http://grubbn.org
WLM: nathangrubb@hotmail.com
Yahoo Messenger: nathangrub
AOL: nathangrubbW
Location: Washington state, USA
Yes (only experimentally). Good thing coreutils was patched at the time.


Top
   
 Post subject:
PostPosted: Tue Jan 13, 2009 1:00 pm 
Offline
Senior Member
User avatar

Joined: Wed Mar 17, 2004 12:35 am
Posts: 118
Website: http://www.necrobones.com/
Location: Sterling, VA
Well, one time, while logged in as root, I was trying to chown some of the hidden "dot files" in a directory, and did something like "chown -R foo:bar .*", and wondered why it was taking so long... only to discover that everything on the system was getting assigned to that user and group, and it was destroying some of the other permissions, such as the sticky bits. What a nightmare.

Luckily I had the system doing a nightly rsync, and it wasn't hard to write a script to compare permissions and ownerships against the two disks and make corrections.

_________________
----
Ed/Bones.


Top
   
 Post subject:
PostPosted: Sat Jan 24, 2009 1:21 pm 
Offline

Joined: Sat Jan 24, 2009 1:15 pm
Posts: 1
yum remove glibc

After running the above, pretty much nothing works. Commands that might be useful in this situation like yum and rpm and wget no longer function. The error message for any of these commands is "/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory". Fortunately the install is only a few days old, but it looks like the only possible solution is to start over from scratch. :(


Top
   
 Post subject: Classic
PostPosted: Mon May 25, 2009 3:46 am 
Offline
Senior Newbie

Joined: Mon May 25, 2009 3:36 am
Posts: 6
Here's a classic video of what happens:
http://www.youtube.com/watch?v=wWOjmvWPRvQ

I've done that command on sub directories getting excited and tab complete didn't find the right area. Took over a minute before I realized it should be done by now and I screwed up.

I also did this with a chmod command when I was new. I was mostly upset with the system and did 'chmod -R 777 /' to stop getting permission errors. I wiped the machine after that didn't even stop the message.


Top
   
 Post subject:
PostPosted: Mon May 25, 2009 4:15 pm 
Offline
Senior Newbie

Joined: Mon May 25, 2009 3:44 pm
Posts: 5
Website: http://www.turleando.com.ar/
Location: Rosario, Argentina
Anyone ran "find / -delete" ? I luckily read about them before someone told me to run that kind of commands as a bad joke.


Top
   
 Post subject:
PostPosted: Fri Aug 07, 2009 3:49 am 
Offline
Newbie

Joined: Fri Aug 07, 2009 3:24 am
Posts: 4
The closest I've ever come was when I set the immutable bit on every file on my filesystem, because from a backup script I invoked a subshell that ran

Quote:
chattr -R +i /$BACKUP_DIR


but forgot to export $BACKUP_DIR, so in the subshell it evaluated to the empty string.


Top
   
 Post subject:
PostPosted: Fri Aug 07, 2009 6:37 am 
Offline
Junior Member

Joined: Mon Sep 22, 2008 8:41 am
Posts: 48
Location: London, UK
Oppsss wrong cast...
I thought its rm -rf, but then I noticed its rm -rf / (nevr ran this one).
I am using rm- rf /path/ when I have to delete a certain directory with subfolders.


Top
   
 Post subject:
PostPosted: Sun Aug 16, 2009 9:23 pm 
Offline
Senior Member

Joined: Mon Feb 02, 2009 1:43 am
Posts: 67
Website: http://fukawi2.nl
Location: Melbourne, Australia
SelfishMan wrote:
I never ran 'rm -rf /' by accident but have done it intentionally.

Me too - decommisioning an old server :P

It was quite an anti-climax and boring actually. The system keeps running, but you just can't do a whole lot with it.


Top
   
 Post subject:
PostPosted: Mon Aug 17, 2009 4:53 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
fukawi2 wrote:
SelfishMan wrote:
I never ran 'rm -rf /' by accident but have done it intentionally.

Me too - decommisioning an old server :P

It was quite an anti-climax and boring actually. The system keeps running, but you just can't do a whole lot with it.


For that, I prefer 'cat /dev/zero > /dev/hda' myself ;)


Top
   
 Post subject:
PostPosted: Mon Aug 17, 2009 7:09 pm 
Offline
Senior Member

Joined: Mon Feb 02, 2009 1:43 am
Posts: 67
Website: http://fukawi2.nl
Location: Melbourne, Australia
*adds that to the bucket list* :P


Top
   
 Post subject:
PostPosted: Wed Aug 19, 2009 4:17 pm 
Offline
Senior Member

Joined: Thu Aug 28, 2003 12:57 am
Posts: 273
I haven't done it myself, but I have an "rm -rf" related story to tell.

Back in 1992 I got my first programming job in University. It was writing perl scripts to generate reports from the logs of the various server systems that ran on campus (this was at CMU and back then they had a distributed computing system called "Andrew" that ran on various Unix systems). I was given root access to a variety of servers so that I could install and run scripts with access to the logs.

After my very first day on the job I had a hardware lab as part of a digital design class I was taking. I had a friend who was a lab partner with me and I thought I was so cool because I had root on some of the campus' most important servers. So I went over to a VT100 terminal in the lab (those were the days!) and said "watch this". I proceeded to telnet to one of the servers (those were the days!) and log in as root. I thought my friend would be impressed. He immediately threw his hands to the keyboard and typed "rm -rf /". I think he meant it only as a joke and didn't meant to press enter. But I think that the muscle memory of hitting enter after every command, combined with the fact that I jostled him as I tried to push him away from the keyboard once I saw what he had typed, caused him to actually press enter.

I hit Ctrl-C as quickly as I could but ... the damage was done. Files had been removed.

I was so afraid that I was going to lose my job over this mistake. I was embarrassed and contacted my boss immediately to let him know what happened. Thankfully, he was very understanding and managed to recover the lost files from a similar system that was running elsewhere in the hardware lab.

And I didn't lose my job. I felt very lucky and relieved and believe me, I never made a mistake like that again! I have always treated a root shell with alot of respect ever since.


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