LinuxQuestions.org
Visit Jeremy's Blog.
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 Today, 11:57 AM   #1
exerceo
Member
 
Registered: Oct 2022
Posts: 155

Rep: Reputation: 31
Question How to find out which file is on given block on a FAT32?


[Log in to get rid of this advertisement]
Use case: finding out which files are damaged.

badblocks prints a list of all damaged files. Let's say block 166594392 is damaged. How to find out which file is on it?

One could open a HEX editor and jump there to guess what data is there, but for binary data that is not very useful. I realize it will be different for every file system. Another possibility would be something like this:

Code:
find -type f -exec filefrag -e "{}" \; >> /tmp/filefrag.txt
And searching for the closest LBA in the long list.

Is there any other way I am not aware of?

For now, I need this on FAT32.

On Windows, IsoBuster allows seeing the LBA of every file and even has a search feature.

Last edited by exerceo; Today at 12:05 PM. Reason: improving command
 
  


Reply

Tags
fragmentation



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
Shell script to find out all hosts which have connected ever to a given linux box. vipinsqa Linux - Newbie 9 10-30-2014 12:11 AM
i tried using this code for deleting a user given character from a user given string mecrazyme1234 Linux - Newbie 2 06-04-2011 04:59 PM
i tried using this code for deleting a user given character from a user given string mecrazyme1234 Programming 7 06-04-2011 11:47 AM
Formating FAT32, but linux created FAT32 is not like win created FAT32?? Difference? boki15 Linux - Newbie 19 07-21-2010 04:41 AM
merge files, given its odd and even given timepassman Linux - Software 1 05-08-2008 01:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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