I'm struggling to figure out a way to do this...I'm using less to view a large (~1GB) file. I want to jump to line "$n" in the file - preferably without having to wait for lines 1-($n-1) to scroll by in my terminal.
I would do this in vim using something like this:
localhost:~# vim myfile +$n
Is there an equivalent command line option? If not, is there a way to do this once the file is open in less?
1 Answer
If the file is open you can type:
100gto go to the 100th line.50pto go to 50% into the file.100Pto go to the line containing 100th byte.
You can use these from terminal by adding + in front of them:
less +100g bigfile.txt 3