I lost my Desktop folder(I had a lot of stuff there.. maybe 1000 files). And used a tool to recover the deleted files right away. If found all the deleted files and recovered them. They all looked ok as far a dates and sizes, etc... So, I copied them back to my desktop folder, only to find out that every single one was 100% NUL inside. I don't think they even have any carriage returns. Just one long string of nulls. The files are the correct sizes though. So..
Luckily, I had an old backup from 1.5 months ago and was able to restore about 80% of the files.
But now I have 20% of the files, full of NULLs scattered throughout the desktop and folders on the desktop.
I don't know Python, and I cannot find any tool to identify these files. It seems crazy to me that there is no tool someone has made that can find a file that is full of 100% NUL 00 characters??? I'm 61 now and retired, but I was a software developer and I don't want to learn a language just to do this.. This does seem like an opportunity for someone to make a tool to share. I've tried grepWin using Regex searches, and searched all over but I have found many people trying to do the same thing and failing..
I have some sample NUL files to test with. I don't see any way to upload them here..
tr -d '\0' < myFile | wc -c
. Wrapping that inside a recursivefind
, and converting that output to arm -f
script, should do it. Except for genuinely empty files, though.