Sometimes less wrongly recognize file as binary and tries to show hexdump on LHS (usually ones with non-alphanumeric characters but still containing printable ASCII characters). How to force it to recognize it as text?
Force less to display a file as text
less
Best Answer
I think you have (or your distribution has) a
LESSOPEN
filter set up forless
. Try the following to tellless
to not use the filter:For further exploration, also try
echo $LESSOPEN
. It probably contains the name of a shell script (/usr/bin/lesspipe
for me), which you can read through to see what sort of filters there are. Also tryman less
, and read the Input Preprocessor section.