Post #1555921
2026-03-11 23:41 UTC
Replies (4)
-
@keirFox@tiggi.es 2026-03-12 02:13
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.
-
@Canageek@wandering.shop 2026-03-12 00:07
@keirFox You mentioned images, is it just images or is it lots of different types of files?
-
@IceWolf@masto.brightfur.net 2026-03-12 01:25
@keirFox Yikes. That sounds like your disk dying. This is a "get a new disk and copy everything over NOW" situation. There are filesystems that can detect this sort of corruption. btrfs might be a good choice. It keeps checksums of all files, and there's a "btrfs scrub" command that can do this. So yeah, you can format the new disk btrfs instead of ext4 and it should protect you from this. It won't automatically repair, not unless you tell it to keep two copies of everything (which you can do! but then you only get half the disk space), but you can pull the good copies from your backups. That won't help for anything that's already corrupted, of course. Hopefully your backups can help with that... I bet you could, _after_ copying everything, on the new disk, search for files that have lots of NULs in them. I bet grep can. If they're _completely_ zeroed out it might be easier. But yeah first order of business is to get a replacement disk. Sorry about the cost.
-
@thumper@bunny.social 2026-03-12 02:15
@keirFox I use Kopia for backups. It does hash/fingerprint all files for deduplication purposes. It is open source. I'm not sure if it can do this already but perhaps there is a way to leverage it's fingerprinting to alert you during a backup run that some files with unchanged name/size/metadata have actually changed content/fingerprint and therefore alert you that your 'content' was lost since the previous backup run... just thinking out loud...