Turn off counting line numbers in less command
Asked Answered
C

1

10

In openSUSE 12.2, the less command counts line numbers when the file is opened. This causes a lot of delays when working with huge files. Is there a way to disable this option?

Crockett answered 27/2, 2016 at 11:56 Comment(0)
C
11

My less (cygwin) has a -n option to suppress that default behavior. Equivalent to the long version --line-numbers. Do man less to see your less's options.

Cheryl answered 27/2, 2016 at 12:16 Comment(2)
-n option counts the bytes instead of number of lines. But yes, it is fast and saves from delay of counting line numbers of huge files.Crockett
Probably because bytes can be seeked (where lines generally can't, without using some sort of index on newlines).Cheryl

© 2022 - 2024 — McMap. All rights reserved.