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'm sure it's very simple, but I can't remember how to tell a terminal pager (more/less/pg/most) to display a long list in columns.

Since my input is just a list of short elements, displaying it the same way ls does it by default would save me needless scrolling and precious screen real estate.




aaa ddd ggg
bbb eee hhh
ccc fff iii
share|improve this question
up vote 5 down vote accepted

Use column.


ls -1 | column -c 100

This will format the output of ls -1 (one entry per line) to fit as many columns of equal size as possible in rows that are 100 character wide.

share|improve this answer

You can use paste to join lines from stdin:

paste - - - < filename
share|improve this answer

Similar to Daniel Beck's answer:

$ echo {a..c}{a..c}{a..c}| tr \  \\n | column | sed 's/\t/ /g' | $PAGER
aaa aba aca baa bba bca caa cba cca
aab abb acb bab bbb bcb cab cbb ccb
aac abc acc bac bbc bcc cac cbc ccc

The key is to make the output more compact by substituting tabs with spaces.

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.