I've got a fragment of an image file produced by data-recovery software. I suspect the complete original is somewhere on my home fileserver.
If this were a fragment of a text file, I could just grab a unique-looking fragment, run grep -r -l -F
, and come back in a few hours for the answer. However, since this is a binary file, it's got all sorts of things that grep
doesn't like (such as null bytes), and even if I can get past that, I don't know how to give grep
input that isn't valid UTF-8.
How can I search for the original, preferably without writing my own search program?
(This is not a duplicate of this question: despite the likely-sounding title, that one is about finding strings in binary files, where I'm looking for binary data in binary files.)