See line number while you cat a file Leave a reply Use the -n option: cat -n pom.xml You can now grep over the output for that particular line number you’d like to see. Avoid annoying lessing and searching for manually.