LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
LinkBack Search this Thread
Old 11-20-2009, 05:12 AM   #31
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Laptop: Slackware 13.37 // Desktop: Slackware64 13.37 // Netbook: Slackware 13.37
Posts: 5,476
Blog Entries: 48

Rep: Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641

When you've rm'ed your whole filesystem, what does rm, the actual executable, do then? Self-destruct? Commit suicide? Go round in ever decreasing circles and disappear up its own backside?
 
Old 11-20-2009, 06:04 AM   #32
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: back to Arch
Posts: 16,637

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Originally Posted by brianL View Post
When you've rm'ed your whole filesystem, what does rm, the actual executable, do then? Self-destruct? Commit suicide? Go round in ever decreasing circles and disappear up its own backside?
Sorry, probably not anything quite so dramatic......

I'd assume that rm was running from RAM---it would erase everything and then stop.

More generally, what happens when you run any program (which is this context means any callable code--utility, application, etc.)? My assumption: the code is loaded into RAM, and control is passed to it. From that point forward, it does not care what is on the disk---until it needs something. So---in the case of rm (or any number of simple utilities)---it just runs until it's done.

This would be easy to test----but I'm not going to..
 
Old 11-20-2009, 07:02 AM   #33
rich_c
Member
 
Registered: Apr 2008
Location: UK
Distribution: Mepis; Maemo; openSUSE
Posts: 370
Blog Entries: 70

Rep: Reputation: 81
Talking

Here's some idea what happens.
 
Old 11-20-2009, 07:06 AM   #34
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Laptop: Slackware 13.37 // Desktop: Slackware64 13.37 // Netbook: Slackware 13.37
Posts: 5,476
Blog Entries: 48

Rep: Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641
I suppose I could install a distro in VirtualBox and try it sometime.
 
Old 11-20-2009, 07:13 AM   #35
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Laptop: Slackware 13.37 // Desktop: Slackware64 13.37 // Netbook: Slackware 13.37
Posts: 5,476
Blog Entries: 48

Rep: Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641
Thanks, rich_c. I was thinking it might be best to drop to a CLI runlevel, shut down X first. Interesting experiment.
 
Old 11-20-2009, 10:23 AM   #36
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: washington U.S.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 2,094

Original Poster
Rep: Reputation: 104Reputation: 104
Quote:
Originally Posted by brianL View Post
Thanks, rich_c. I was thinking it might be best to drop to a CLI runlevel, shut down X first. Interesting experiment.
you could always copy your root filesystem files to a sub directory then chroot to make it the root, rm it, then after a force reboot with the power button it will be back to normal.
 
Old 11-20-2009, 11:29 AM   #37
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 13.37
Posts: 430

Rep: Reputation: 56
Hmm, it wipes the inode-tables so every reference to every file is delete. So if you're lucky and pull the power cord, you can recreate > 90% of the deleted files as the data is untouched.
I want to try this out in a controlled environment as an experiment some time. Possible in the winter if I don't forget it :P
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to enable GUI root login in Mandriva? zebra90210 Mandriva 4 03-13-2008 06:20 AM
How to enable auto login for root in Redhat alix123 Programming 5 06-27-2007 12:43 AM
How to enable root login on 6.06 dapper? Sjonnie48 Ubuntu 6 06-11-2007 08:36 AM
Enable root login in wu-ftpd? Sevoma Linux - Software 5 02-04-2005 06:49 PM
Disable/Enable Root Login @ Console ryanstrayer Linux - Security 4 01-18-2002 04:49 PM


All times are GMT -5. The time now is 03:46 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration