LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 01-26-2007, 09:41 PM   #1
thtr2k
Member
 
Registered: Mar 2005
Location: Australia
Posts: 71

Rep: Reputation: 15
recover lost files


Hi,
i accidentedly deleted some files, does anyone know how to recover them from "command line"?
Thanks
 
Old 01-26-2007, 10:04 PM   #2
FnordPerfect
Member
 
Registered: Dec 2006
Location: Germany
Distribution: Kubuntu (Feisty Fawn), Debian (SID)
Posts: 127

Rep: Reputation: 15
Be warned, this is not trivial... :-(

For the future I suggest you to have a look at this
http://directory.fsf.org/libtrash.html
It is a wrapper library (LD_PRELOAD hack) around the system calls which Linux uses when deleting files, and which moves them to a configurable location instead.

However, for now, it might be easy but it might be as well impossible.

I once read that you should for heaven's sake not unmount and re-mount the partition (that is, not reboot!).

If there is still any process running which holds the specific file open, then you're lucky and just copy the file descriptor from the /proc directory.
Here's a guide for that:
http://www.linux.com/article.pl?sid=06/10/30/1652211

There are utilities for ext2 based file systems. One is called recover, and one e2undel. But you need to remember some informations about the files. And it won't work with ext3...

Also, depending on file type you might want to try forensic utilities. These scan the whole partition for "magic bytes"/headers of known filetypes and *try* to restore them.
* magicrescue
* foremost
* http://www.cgsecurity.org/wiki/PhotoRec
* probably others... search for 'forensic' in your package manager

good night, and good luck
 
  


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
Lost My Files--Help needed to recover them svasanth Linux - Newbie 2 09-06-2006 03:51 AM
**Reinstalled, need to recover lost files aspinnler Ubuntu 6 02-08-2006 05:48 PM
rm -R, lost my files, any way to recover? mm.. :) brynjarh Linux - General 1 05-10-2005 06:39 AM
recover lost DOS files 90-60-90 General 5 02-16-2005 09:41 PM
Recover lost files? chup Linux - General 2 08-23-2003 10:28 AM


All times are GMT -5. The time now is 06:55 AM.

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