Tuesday, August 31, 2010

calculate total line number of a text file on Linux

command:
wc -l

jump to the line of large file:

http://superuser.com/questions/113039/less-quickly-jump-to-line-number-in-large-file
vim myfile +$n


If the file is open you can type:
100g to go to the 100th line.
50p to go to 50% into the file.
100P to go to the line containing 100th byte.
You can use these from terminal by adding + in front of them:less +100g bigfile.txt

No comments: