For a MacOS and Ubuntu Server 20, with the command
man less I can read the following:
-n or --line-numbers Suppresses line numbers. The default (to use line numbers) may cause less to run more slowly in some cases, especially with a very large input file. Suppressing line numbers with the -n option will avoid this problem. Using line numbers means: the line number will be displayed in the verbose prompt and in the = command, and the v command will pass the cur‐ rent line number to the editor (see also the discussion of LESSEDIT in PROMPTS below). -N or --LINE-NUMBERS Causes a line number to be displayed at the beginning of each line in the display.
The reason of this post is about the
-n (lowercase) parameter that contains the
The default (to use line numbers) part. For the both OS mentioned if I did do:
It displays the data without the line numbers, it is the contrary as indicated above.
Of course If I want see the line numbers I use:
less -N /path/to/filename.txt
It works as indicated. Therefore:
less /path/to/filename.txt less -n /path/to/filename.txt
Is practically the same.
Am I missing something?
-n -N .... --line-numbers --LINE-NUMBERS Don't use line numbers.
Not very clear, is confuse.
I created this post due the following valuable post:
Where indicates in the solution:
You can, however, run "less -n +F", which causes "less" to read only the end of the file, at the cost of **not** displaying line numbers