less Command Display Line Numbers
To display line numbers while using the less command, you can add the
- option when running the less command:less -N file.txtIn this example, the
- option causes less to display line numbers in front of each line of the file. This can be useful when you need to refer to specific lines in a file.