The commonly used pager less can be started with the option -S, prevents it from breaking lines.

One can then press the right and left arrow keys to scroll horizontally.

Since the lines can be quite long, I was wondering whether there a keystroke or a way to jump to the end of the line.

I know that one can increase the step size less uses for scrolling. The problem is, that less doesn't stop to scroll horizontally at the end of the line. Therefore just setting a high numerical value for the step size (scrolling increment) would usually put the view beyond the end of the line.

1 Answer 1


From the manual:

          Scroll horizontally right to show the end of the longest displayed line.

          Scroll horizontally left back to the first column.

These escape sequences were introduced in less version 487, released on 2016-10-25.

  • Seems like this is a new feature. For Ubuntu, it's only available starting from 18.04.
    – wjandrea
    Jul 13, 2018 at 17:40
  • The version of Ubuntu is not as important as the version of less.
    – JdeBP
    Jul 13, 2018 at 17:52
  • less -V yields less 487 (POSIX regular expressions) for me.
    – DopeGhoti
    Jul 13, 2018 at 18:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .