Login
You're viewing the code4lib.social public feed.

Replies

  • Dec 19, 2025, 5:49 PM

    @cusie Hmmmm. You could probably do this with grep (or Bulk Extractor) using a regex along the lines of /\x00{1000,}/—i.e., look for strings of at least 1k null bytes.

    (Check my syntax though, I don’t use the codepoint specifier enough to remember it off the top of my head)

    💬 1🔄 0⭐ 2
  • 💬 1🔄 0⭐ 1
  • Dec 19, 2025, 7:49 PM

    @aarbrk @cusie Depending on your setup, rclone might also be a good option (rsync causes problems with our versioned S3 storage; each partial transfer gets backed up for 90 days, which is a poor use of space)

    And it looks like I did get the regex syntax right. So if you're using GNU grep, the command would be something like
    `grep -PRabo '\x00{1000,}' path/to/repo`

    💬 1🔄 0⭐ 2
  • Dec 22, 2025, 2:10 PM

    @linguistory @aarbrk that works, thanks! Scanning for 50k of zeros works too. I kept thinking about @Thorsted ‘s remark that he encountered damaged files like that before. And that I’d like to have a way to proactively scan for these errors.

    💬 0🔄 0⭐ 2