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?
Unix – Going to a specific line number using Less in Unix
less-unixsearchshellunix
Related Topic
- How to mkdir only if a directory does not already exist
- Bash – How to split a string on a delimiter in Bash
- Bash – How to count all the lines of code in a directory recursively
- Linux – Looping through the content of a file in Bash
- How to do case insensitive search in Vim
- Bash – How to set a variable to the output of a command in Bash
- How to delete from a text file, all lines that contain a specific string
- Bash – Check existence of input argument in a Bash shell script
Best Answer
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.