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

ls -l gives me color coded output. Folders are blue, executables green, etc. These colors are gone when filtering thorough | more. Anyway to achieve both paged output and colors?

share|improve this question
Can you give us a detailed explanation? – Random Guy Oct 5 '11 at 11:21
up vote 6 down vote accepted

Try with less command with repaint(-R) option:

ls --color=always -l | less -R
share|improve this answer
That works, and actually more as pager also works. – eldering Oct 5 '11 at 11:29
Shouldn't it be -R (only change is uppercase R)? See here for why... – Breakthrough Oct 5 '11 at 11:37
@Breakthrough: +1. i'll update it. – Prince John Wesley Oct 5 '11 at 11:39
Actually it also works with more with the --color=always, so that was the key for me! – Nilzor Oct 7 '11 at 8:11
Unfortunately this doesn't work for Mac OS X / BSD, but is fine for Linux – user1442960 Dec 4 '14 at 17:53

Search for the term "escape sequence" in the man page of less. About the colorful stuff, see ANSI escape code # Colors;

There is a detailed solution on on how to have paged & colored output; the key info is:

ls -C --color=always | less -R
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.