Going to a specific line number using Less in Unix

Stole picture Stole · Dec 21, 2011 · Viewed 253.7k times · Source

I have a file that has around million lines. I need to go to line number 320123 to check the data. How do I do that?

Answer

n1r3 picture n1r3 · Dec 21, 2011

With n being the line number:

  • ng: Jump to line number n. Default is the start of the file.
  • nG: Jump to line number n. Default is the end of the file.

So to go to line number 320123, you would type 320123g.

Copy-pasted straight from Wikipedia.