Binary classification prompt during recovered archive inspection
0 reputation · 20 Apr 2024, 01:01 UTC
Binary classification prompt during recovered archive inspection
When verifying data restored from backup archives, the preprocessor pipeline can hand less decompressed files that are mostly text but contain occasional null bytes. The goal is to page through these recovered files without manual intervention, yet less applies a content heuristic based on null bytes and control characters to decide whether input is binary. That boundary is implementation-defined and has changed across releases, so a file that opens cleanly on one system may trigger a binary warning or refusal on another.
Using -f bypasses the binary and non-regular-file checks, but forced display can emit raw escape sequences that alter terminal state. Piped input further complicates verification because less cannot display percentage position without a known file size, making it difficult to confirm that every recovered byte was actually viewed.
Which less version or configuration yields a deterministic binary-versus-text boundary for restored files filtered through LESSOPEN? Should verification workflows avoid relying on the pager's internal classification and instead pre-screen files with an explicit null-byte threshold? Is there a documented way to suppress the binary prompt for recovered archives without forcing display of potentially harmful escape sequences?