2026-03-12 02:13 UTC
So, found a simple regex to find all files that have been NUL'd out and ran it across all my stuff:
find . -type f -size +1c -exec grep -m 1 -PL "[^\0]" {} \;
And it works! And... it's found a handful of images. No documents, no videos, no project files, no python code, no audio, no spreadsheets. No other data. Just images.
And not just any images, but only in two folders -- ones that I tend to browse quite frequently as thumbnails. And only recent images. I don't think this is random.
I have a very strong suspicion that this is from me forcing the laptop to power down when I've locked it up hard while the file browser was open. I've had an issue, lately, in which Mint has been really unhappy with me disconnecting my laptop from my monitors and I've had to be very careful to not just pull the USB cable and walking away with it as I used to -- a recent update janked how KDE deals with the my monitors and I've not yet figured it out and so it's been a little rough.
The good news is that now I can check regularly for these files prior to backup to ensure I don't clobber them while also seeing if I can establish a pattern. I don't think I suspect hardware or malware, though -- I think the thumbnail viewer has been very unhappy with me force-killing my computer when it gets really cranky.
Replies (2)
-
@yakkoj@fosstodon.org 2026-03-12 02:23
@keirFox aha... that would explain it What file system type is this? I've had this happen on ext4 and xfs when I had to force-reset (so the only file I noticed being littered with NUL was /var/log/messages)
-
@forst@mastodon.social 2026-03-12 08:06
@keirFox Perhaps stating the obvious, but the fact that just viewing a directory in a file browser overwrites something in it (that doesn't get flushed to disk on force shutdown) is scary, and I wonder why it's doing it. Bug or intentional? I'd understand if it corrupted the thumbnail cache that's separate from the originals, but overwriting the originals is suspicious.