ZLESS(1)
๐ zless, bestie ๐
okay so real quick โ this is the manual page for zless, and it lives in section 1 of the General Commands Manual (that's the "user commands" section, iykyk). pull up a chair, grab a strawberry ๐, we're doing this.
โจ NAME โจ
zless โ a file perusal filter for crt viewing of compressed text ๐ฆ
โจ SYNOPSIS โจ
zless [ name ... ]
โจ DESCRIPTION โจ
so zless is a filter, right? and what it does is let you look at compressed or plain text files one screenful at a time on a soft-copy terminal. like, it's giving "less but it also handles the gzipped stuff for you". ๐
here's the tea: it is literally the equivalent of setting the environment variable LESSOPEN to:
|gzip -cdfq -- %s
and setting the environment variable LESSMETACHARS to:
<space><tab><newline>;*?"()<>[|&^`#\$%=~
โฆand then just running less. that's it. that's the whole trick. ๐
however โ and this is iconic โ enough people seem to think that having the command zless available is important to be worth providing it. so here we are. the people spoke. ๐ซถ
๐ธ SEE ALSO ๐ธ
๐ BUGS ๐
okay bestie, listen up, this is the important part:
zless does NOT work with compressed data that is piped to it via standard input. it requires that input files be specified as arguments. periodt.
so if you're sitting there going cat thing.gz | zless and wondering why the universe has abandoned you โ that's why. ๐ญ
if you genuinely need to read compressed data from a pipe, you can do this instead:
...|gunzip|less
instead of:
...|zless
no cap, that's the workaround. write it down. ๐
๐ COPYRIGHT NOTICE ๐
Copyright ยฉ 2006โ2007, 2015โ2026 Free Software Foundation, Inc. Copyright ยฉ 1992, 1993 Jean-loup Gailly
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.
and that's the whole page, bestie ๐ this was zless, hanging out in section 1 of the General Commands Manual โ go forth and read your gzipped files one screenful at a time, you absolute main character ๐โจ
๐ฆ where this page comes from
- arch rolling: gzip 1.15-1 ยท GPL-3.0-or-later
- nixpkgs unstable: gzip 1.15
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms