rm -rf /

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post May 25th, 2009, 3:19 am

So has anyone every ran 'rm -rf /' for the hell of it, or on accident?
#define NULL (::rand() % 2)
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 25th, 2009, 3:19 am

  • Don2007
  • Web Master
  • Web Master
  • No Avatar
  • Joined: Nov 21, 2006
  • Posts: 4924
  • Loc: NY
  • Status: Offline

Post May 25th, 2009, 5:23 am

I've never done that. Why don't you try it & let us know the results.
How do you know when a politician is lying? His mouth is moving.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post May 25th, 2009, 10:27 am

haha, Im think I might just do that
#define NULL (::rand() % 2)
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post May 25th, 2009, 12:48 pm

From what I gather via rm --help, you'ld have to pass it a --no-preserve-root flag for it to do anything.

It also says using rm instead of shred will leave "the file" recoverable, but it doesn't say anything about "filesystems" being recoverable.
Strong with this one, the sudo is.
  • Don2007
  • Web Master
  • Web Master
  • No Avatar
  • Joined: Nov 21, 2006
  • Posts: 4924
  • Loc: NY
  • Status: Offline

Post May 25th, 2009, 6:21 pm

-f Attempt to remove the files without prompting for confirmation, regardless of the file's permissions. If the file does not exist, do not display a diagnostic message or modify the exit status to reflect an error. The -f option overrides any previous -i options.

That's all the FreeBSD man page says.
How do you know when a politician is lying? His mouth is moving.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post May 25th, 2009, 7:19 pm

Here's the two options of interest from Ubuntus man page for rm.

Code: [ Select ]
      --no-preserve-root
              do not treat ‘/’ specially
 
       --preserve-root
              do not remove ‘/’ (default)
 
  1.       --no-preserve-root
  2.               do not treat ‘/’ specially
  3.  
  4.        --preserve-root
  5.               do not remove ‘/’ (default)
  6.  
Strong with this one, the sudo is.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 6130
  • Loc: Seattle, WA
  • Status: Offline

Post May 26th, 2009, 7:49 am

There were a couple of videos on YouTube a while back that depict screencasts of people running rm -rf / on a fresh Linux install. The results are pretty funny; it doesn't completely wipe out the system since many root-level files are protected and cannot be deleted, but it does end up wiping out all language files and many important configuration files. The UI environment takes a big hit.
The Beer Monocle. Classy.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Joined: Oct 30, 2004
  • Posts: 2521
  • Loc: /usr/src/MI
  • Status: Offline

Post June 29th, 2009, 5:50 am

should also be noted that simply running "rm -rf /" will do nothing more than
Quote:
rm: cannot remove root directory `/'
as it lacks the proper privileges ;]
Image
"In a world without walls and fences, who needs Windows and Gates?"
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Joined: Jul 20, 2007
  • Posts: 3318
  • Loc: Trout Creek, MT
  • Status: Offline

Post June 29th, 2009, 7:35 am

So the moral of the story is: don't give idiots root access.
Like Mr Spork, I also write about my interest in alcoholic beverages.
  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3229
  • Loc: South Africa
  • Status: Offline

Post June 29th, 2009, 5:05 pm

AnarchY SI wrote:
should also be noted that simply running "rm -rf /" will do nothing more than
Quote:
rm: cannot remove root directory `/'
as it lacks the proper privileges ;]


You read my mind! :)
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post June 29th, 2009, 6:52 pm

What about this? it wont try to remove the directory root, just everything inside of it.
Code: [ Select ]
rm -rf /*


I think I might throw up a instance on my mosso account to check this out here soon.
#define NULL (::rand() % 2)

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 42 guests
  • 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
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.