Sample Header Ad - 728x90

Issue viewing compressed file with "zless", but not with "zmore" or "gunzip -c"

10 votes
1 answer
895 views
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?
Asked by Kusalananda (354449 rep)
Apr 16, 2023, 12:29 PM
Last activity: Apr 17, 2023, 11:35 AM