LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-09-2007, 02:26 PM   #1
brazilian_user
Member
 
Registered: Nov 2005
Location: Brazil, Poá - São Paulo
Distribution: Debian Etch
Posts: 110

Rep: Reputation: 15
Recovering a deleted file


Hello there!!

Is there a way of recovering a file after an rm -rf ??

This has never happened to me but I'm quite curious, maybe there is a way of fixing this.

Thank You!
 
Old 08-09-2007, 02:44 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Yes--just don't write to the disk. When deleting a file, the only thing removed is the link to the data---all the data is still there until the system writes something else in the same location.
The most common thing referenced is "testdisk". ( I have not personally used it)
 
Old 08-09-2007, 03:23 PM   #3
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
I'd like to add that testdisk is only part of the solution. Its purpose is to restore lost partitions while things like file recovery belongs to applications such as photorec and foremost.

As Pixellany pointed out, the files are not deleted but they have lost their unique names (unless the disk was zeroed, which is a lot more racical than a simple rm (-rf). Recovery applications will dig into the disk to recover the files and rename them. The process is not infallible, however, and larger files in particular stand a higher risk of coming out (all) wrong. A 200MB movie, for example, may be cut up and reconstituted incorrectly; other files may be simply run together because the disk no longer holds information that specifies where one files ends and another begins.

Bear in mind that recovering individual files can be a lot more time-consuming than you may think; in most cases the entire partition needs to be scanned and this may result in thousands of restored files that have to be sorted and renamed by the user.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovering a deleted file on ext3... almost there! abegetchell Linux - Software 12 10-15-2009 11:10 AM
Recovering the Deleted file how ? winxandlinx Linux - Software 1 09-21-2006 09:40 AM
recovering a deleted file? berrance Linux - Software 4 03-24-2006 08:56 AM
LXer: Recovering deleted /etc/shadow password file LXer Syndicated Linux News 0 12-21-2005 04:46 PM
Recovering deleted files?? DaFrEQ Linux - General 8 09-17-2005 01:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:36 PM.

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
Open Source Consulting | Domain Registration