LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-18-2003, 11:12 PM   #1
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
rm -rf /usr/lib


I just typed that in. I am now typing on my windows box. I meant to type #rm -rf /usr/lib/apt. I was trying to manually erase apt(that is a whole nother story). The next time I use the command rm -rf I will be much more cautious?
 
Old 09-18-2003, 11:33 PM   #2
pbharris
Member
 
Registered: Apr 2001
Location: chicago, IL
Distribution: debian, redhat
Posts: 280

Rep: Reputation: 30
owwiee.....
 
Old 09-19-2003, 04:29 AM   #3
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
Dang. I bet you muttered a few not-to-be-repeated choice words. For future reference, if you have a journaling fs (ext3, etc.), you can just kill the power on the computer real quick. Since the commit interval is usually around 5 minutes, you have a window of time where the `rm -rf' hasn't actually taken place yet.
 
Old 09-19-2003, 09:23 AM   #4
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
I do not understand why I would have had five minutes. Could you please explain it to me. Isn't the erasure immediate.
 
Old 09-19-2003, 02:52 PM   #5
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
Nope, it's not immediate in the journal. Remember when you erase something the fs (well not ext2 or ext3) doesn't go and write zeros were the file physically existed on the drive. It writes the changes to the disk's buffer cache. Later, it simply deletes the pointers to that file in the metadata of the fs. The journal is an image of this metadata. Since the journal is only updated at regular intervals there is a window of opportunity to "undelete" something.

Granted it's a last ditch solution, since shutting down a computer in that fashion is pretty hard on it, especially the hard drive. But if it means saving some important data it's probably worth it.

For more interesting reading than this check out this article [linuxgazette.com].
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Relocat /usr/lib and /usr/lib64 to a different path schokshi Fedora 3 08-30-2005 09:14 PM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-28-2004 11:33 PM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 09:21 AM
/usr/lib and /usr/local/lib doxxan Slackware 5 06-15-2004 12:58 AM
Relationship between /usr/bin and /usr/lib glume Linux - Newbie 4 04-16-2004 08:11 AM


All times are GMT -5. The time now is 09:17 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration