Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-03-2008, 09:15 AM   #1
LQ Newbie
Registered: Jan 2008
Posts: 3

Rep: Reputation: 0
rm -rf * on /

My roommates thought it would be funny to run that command on our home Debian server. We were going to do a reinstall anyway still kind of sucks though...

My question is one ran it and the other cancelled it shortly after (he says like 5-10 seconds). What I can't figure out is how everything is still running. I can run no commands at all from the terminal but everything else seems to be running. It is serving files, doing backups, etc. I assume everything will be lost when I reboot. Can anyone explain this behaviour to a newb?

Old 01-03-2008, 09:23 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
well rm will just dereference the inodes. the data is still there, and if a file is already opened by a web server of something then data will continue to be written to that part of the disk.
Old 01-03-2008, 09:27 AM   #3
LQ Newbie
Registered: Jan 2008
Posts: 3

Original Poster
Rep: Reputation: 0
So it will still function until over-written and/or rebooted?
Old 01-03-2008, 09:41 AM   #4
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
Sure brings back memories. I was working with a guy who did just what you tried, only by accident. He thought he was in a sub dir, but he was in /.
He realized it 20 or 30 seconds later and control C'd to stop the recursive remove.
The system still responded to some commands and some things worked but we knew we were missing key files. We simply reinstalled and moved on.

Linux will surprise you sometimes, but you know you have a hosed system. I'd just reload like you originally planned.
No way I wound want to try to piece a system that has had that happen back together. Much easier to start from scratch.
Old 01-03-2008, 09:53 AM   #5
LQ Newbie
Registered: Jan 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Yep thats what I'm going to do. I was just curious as to how everything was still functioning. Thanks for the responses!
Old 01-03-2008, 11:03 AM   #6
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Files which are help open by processes will not be deleted (unlinked) until the last process with them open closes the file and any links from directories are removed. At this point the link count to the actual file on disk will drop to 0 and then the file will be removed.

When you reboot, these files will be un-available because the programs will have terminated and thus the files will become unlinked, and thus many of the programs now running will fail to re-start.


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:54 AM.

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