userimage

linux Command to read the number of lines in a file

i have a file something xyz.txt. How can i use linux Command to read the number of lines in a file.

userimage

You can use nl command to read the number of lines using command on top of a file.


nl <file path with file name>

Answer is