There I said it !

  • interdimensionalmeme@lemmy.mlOP
    link
    fedilink
    arrow-up
    4
    arrow-down
    2
    ·
    5 days ago

    Even a corrupt compressed files has a very different structure relative to plain text. “file” already has the code to detect exactly which.

    Still, failing on corrupted compression instead of failing on plaintext would be an improvement.

    • Malfeasant@lemm.ee
      link
      fedilink
      arrow-up
      4
      ·
      4 days ago

      What even is plain text anymore? If you mean ASCII, ok, but that leaves out a lot. Should it include a minimal utf-8 detector? Utf-16? The latest goofy encoding? Should zcat duplicate the functionality of file? Generally, unix-like commands do one thing, and do it well, combining multiple functions is frowned upon.

      • interdimensionalmeme@lemmy.mlOP
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        4 days ago

        I wouldn’t call all this hoop jumping to reading common log files “doing it better”.

        This is exactly the kind of arcane tinkering that makes everything a tedious time wasting chore on linux.

        At this point it’s accepted that text files get zipped and that should be handled transparently and not be precious about kilobits of logic storage as if we were still stuck on a 80386 with 4 megs of ram.