Want to count the number of lines in a Linux file? We’ll provide you with a few different ways to do it. Counting the number of lines gives information about how small or large a given file is.
Source : 6 Ways to Count the Number of Lines in a Linux File