Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn off counting line numbers in less command

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?

like image 230
M.sh Avatar asked Feb 27 '16 11:02

M.sh


People also ask

How do I turn on line numbers in less?

You can easily display line numbers using less command. All you have to do is pass either -N or --LINE-NUMBERS option to the less command. This option forces less to show a line number at the beginning of each line in the screen.

How do I turn off line numbers in vim?

Make the vi/vim text editor show or hide line numbers Press ESC key. At the : prompt type the following command to run on line numbers: set number. To turn off line numbering, type the following command at the : prompt set nonumber.

What is the command to count only the number of lines in the file?

Use the wc command to count the number of lines, words, and bytes in the files specified by the File parameter. If a file is not specified for the File parameter, standard input is used.


1 Answers

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.

like image 149
Jeff Y Avatar answered Sep 22 '22 07:09

Jeff Y