Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some logs which I want to read in less. Unfortunately, scattered throughout the otherwise text file are some non-ascii characters that less displays as highlighted junk. This is really annoying.

How do I get rid of the highlighting?

share|improve this question
up vote 2 down vote accepted

There doesn't appear to be an option for it. Your choices then are (a) build your own modified version of less, and (b) filter those characters out before less gets hold of them, like this:

LANG= tr -cd '[:print:]' <yourfile | less

LANG is unset so that tr doesn't try to combine control characters into multibyte characters.

share|improve this answer

Or use:

less -r

(display raw characters, if your terminal supports that)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.