LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-16-2008, 09:20 AM   #1
hhanff
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Rep: Reputation: 2
Is it possible to extract a file from FAT16 image by it's name/extension???


Hello!

I have a problem. There is probably a file called Test.raw on a FAT16 image which was sent to me. I hope it was not overwritten.
I found several linux-tools that can recover files by their header/footer information.
My question is: Is it possible to recover a file only by it's name/extension?

Greetings,

Hendrik
 
Old 10-16-2008, 09:41 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
mount the fat16 image in loopback mode.
mount -o loop <image.name> <mountpoint>
then run find on the mountpoint where yo umounted the image

find /mountpoint -name "image.raw" -print
 
Old 10-16-2008, 10:29 AM   #3
hhanff
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by whansard View Post
mount the fat16 image in loopback mode.
mount -o loop <image.name> <mountpoint>
then run find on the mountpoint where yo umounted the image

find /mountpoint -name "image.raw" -print
What I did was
grep -oba Test linux.img
... and then cut the area with
dd if=linux.img of=part bs=1 count=1024 skip=24359
... but I could not find Test.raw... only Test or RAW.
I will try your method tomorrow. Thanks in advance.

Also I wonder what about fragmentation.... usually files are not written to the HDD in one big block, but are distributed over several clusters...



Hendrik

Last edited by hhanff; 10-16-2008 at 10:42 AM.
 
Old 10-17-2008, 01:23 AM   #4
hhanff
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by whansard View Post
mount the fat16 image in loopback mode.
mount -o loop <image.name> <mountpoint>
then run find on the mountpoint where yo umounted the image

find /mountpoint -name "image.raw" -print
Thanks for your help.
It finds the existing loop/CPT/Test.raw file. But there should be some other Test.raw files on the image which were deleted... any other ideas???
 
  


Reply



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
Linux file extension vs Dos file Extension? manaa Linux - Newbie 6 02-12-2009 04:19 PM
Image File - How to extract? tobiasw Linux - Software 2 10-24-2006 04:57 PM
question on software that extract cd image file bbmak Linux - Newbie 1 07-03-2004 11:33 PM
how to write a fat16 file system!? Linos Linux - Software 4 09-09-2003 05:56 AM
how to extract an ISO image from a CD davido Linux - General 3 07-08-2003 03:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:25 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