SyntaxFix
Write A Post
Hire A Developer
Questions
You could filter the file through cat -n before piping to less:
cat -n
less
cat -n file.txt | less
Or, if your version of less supports it, the -N option:
-N
less -N file.txt