On my FreeBSD 13.2 system, the zless utility cannot view text files compressed with gzip or compress, warning that they may be binary files and then showing garbage if I say I want to see the contents anyway. Strangely, using zmore or gunzip -c seems to work.
$ zless znapzend.log.1.gz
"znapzend.log.1.gz" may be a binary file. See it anyway?
(Answering affirmatively sends binary data to the terminal.)
$ zless --version
less 608 (POSIX regular expressions)
Copyright (C) 1984-2022 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less
$ zmore --version
less 608 (POSIX regular expressions)
Copyright (C) 1984-2022 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less
What is the cause of this?