Contents
How do I grep a specific line number in Linux?
The -n ( or –line-number ) option tells grep to show the line number of the lines containing a string that matches a pattern. When this option is used, grep prints the matches to standard output prefixed with the line number.
How do I search for a specific line in Linux?
To do this, go to Edit -> Preferences and tick the box that says “Display line numbers.” You can also jump to a specific line number by using Ctrl + I .