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.