Short version: How can I make the less utility in Linux not wrap lines?

Long version: Often I need to view huge CSV files using less with hundreds of columns. I frequently only care about the first couple columns. However, word wrap causes one line to become several lines even on wide-screen monitors.

link|improve this question

48% accept rate
feedback

2 Answers

up vote 10 down vote accepted

-S option, see also the man-page.

link|improve this answer
5  
... and toggle inside less with the same keys (-, then Shift-S). – user112553 Apr 19 '11 at 16:27
I knew it had to be something. The man page calls wrapping folding and non-wrapping chopping. – User1 Apr 19 '11 at 16:36
feedback

Don't know if less has a option for that, but I use the most command which does that by default (and allows scrolling left/right to view it)

link|improve this answer
That sounds like a useful utility. Unfortunately most Linux distros don't have that tool by default. Sorry, I just couldn't help the pun. – User1 Apr 19 '11 at 16:52
feedback

Your Answer

 
or
required, but never shown

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