Elektrine lite

← Feed

@keirFox@tiggi.es

Post #1555922

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 (4)

  • @draeath@infosec.exchange 2026-03-12 02:16

    @keirFox it's a bit of a workaround, but if you have a phone you can install termux on, consider SSH'ing into the laptop and issuing a clean reboot (or if it's a recent-enough distro, try systemctl soft-reboot for a quicker time). This has saved my own bacon a few times over the years.

    Open ##1555935

  • @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)

    Open ##1555939

  • @nytpu@tilde.zone 2026-03-12 05:00

    @keirFox Hmm, two things that might help in the future: Using "REISUB" with the Magic SysRq key will pretty universally safely shut down even "hard frozen" systems unless there's literally a Kernel panic. Hold Alt, and, holding it the whole time, press Print Screen (screenshot on some keyboards, or my laptop keyboard actually sneakily offers SysRq with function+s), then slowly type r-e-i-s-u-b one character at a time and your screen should go black and then reboot after the b (you can repeat it if it doesn't seem to work the first time) And, it might be worth it to look into some incremental backup thing like Borg backup so it's easier to restore files in the future? https://www.borgbackup.org/ It works by only storing the changes that occurred between backups in files, so you could make a new backup every hour if you wanted and it'd barely increase the storage at all, only storing the differences (rather than storing whole copies of every file every time like manual backups or some backup software). So you still have access old versions and can go back as far as necessary to find the uncorrupted copy

    Open ##1555942

  • @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.

    Open ##1555944