I've just recovered several GB of data using photorec from a family friend's dead NAS backup box. So far so good.
But as is common with the methods used by photorec it can generate some very large files which are largely rubbish. Eg tiny gif files being recovered as >1GB because photorec hasn't detected the end of the file.
I'm looking for tools that can postprocess these files, but looking around I'm seeing people discussing the problem as if it's just one of those things. Does anyone have any experience of this sort of thing?
My typical strategy is to use "find" to locate recovered files by file extension and move them to a directory per file type, then hand the results over to whoever's disk it was. But I know I can do better!
For example: The 1GB+ GIF file can be "fixed" using convert or mogrify (from ImageMagick): convert recovered.gif fixed.gif As far as I know that effectively loads the file and re-saves it without making any changes (but all the rubbish gets stripped in the process) - can anyone confirm this? If so: cd recovered/gif && mogrify * .. is a safe way to fix the recovered files.
Similarly, .zip files (and related files, such as LibreOffice docs) can have this problem; extracting the zip and recreating it fixes it.
Any other tricks I should be aware of? Anyone aware of any tools to automate this? Ideally this should happen in tandem with the recovery; all those wasted GB are reducing the capacity of the destination drive, sometimes to the point that the recovery fails to complete.
Mark