Thursday, 2 January 2020

windows - How to find all files that consist only of null bytes (any number of them)


I need to find all the files on my HDDd that contains only (any number of) NULL bytes. How can I do it on Windows machine. Or with Linux tools live CD?




Background:


Something has malformed a bunch of files on my hard drive. The malformed files:



  • have theirs content replaced with NULL bytes,

  • are exactly the same size as before the malform happen,

  • modification time was not altered


This is weird. I have located about 40 of them in a HTML/PHP project directory. I can't determine the date when that happend, but it seems that it was more than a few weeks ago, as all my backups contains those malformed files. I haven't notice that because I did not use the local files, and the remote copy on my development server is OK, so the sites I was working on were not affected.


I have already restored those files from latest svn commit, but I do not know which other files are affected.



Answer



Install the (free) version of TotalCommander and search for all files containing 0x0 ten times for example. Then look in the files what they really contain.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...