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 07-28-2005, 07:40 PM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,618

Rep: Reputation: 48
undeleting ext3 files


hi

I have Debian Sarge installed on ext3

by mistake I've deleted some important TEXT files

how I know, ext3 data structures do not support any method of undeleting

I've heard there is only a one posibbility using grep, but know someone how it works ?

kind regards
cccc

Last edited by cccc; 07-28-2005 at 08:32 PM.
 
Old 07-29-2005, 03:18 AM   #2
evilmrhenry
Member
 
Registered: Oct 2003
Distribution: Knoppix
Posts: 103

Rep: Reputation: 15
Basically, deleting a file in ext3 removes references to the file, but not the actual file. What you need to do is something like:

grep -a -C 40 -i "important document" /dev/hda > output.txt
The -a enables the binary /dev/hda file to be treated as text, the -C 40 gives 40 lines of context around the line you are searching for, the "important document" is a line that you remember from the document (in quotes), the /dev/hda is the location of the actual hard drive, and the > output.txt routes the output to a text file.

Adjust the options as needed.

As a final note, turn off the computer ASAP, and do all this via Knoppix (or similar) if at all possible. Any time a file will be written to the disk, there is a chance the important files will be overwritten. Also make sure the output file does not reside on the drive in question. (Knoppix home directory would be a good option.)
 
Old 07-31-2005, 07:23 AM   #3
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,618

Original Poster
Rep: Reputation: 48
thanks !
 
  


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
undelete files on ext3 santner Linux - General 0 04-27-2004 09:06 AM
Undeleting ReiserFS Files KingofBLASH Linux - General 1 12-29-2003 05:10 PM
undeleting accidentally deleted files darksarin Linux - Newbie 3 11-21-2003 09:08 AM
recover files in ext3 hana_abe Linux - Newbie 3 11-16-2003 10:46 AM
Need help undeleting... Kobinator Linux - General 6 10-26-2003 05:43 PM


All times are GMT -5. The time now is 07:04 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration