Count lines in a file
wc (short for word count) is a command in Linux that displays a count of lines (newline characters, to be precise), words, and bytes for each file you specify. The program prints these three numbers for each file you specify. For example, to find out how many lines, words and bytes bobs_file.txt has, we can use the following command:
In the picture above you can see that the bobs_file.txt file contains 5 lines, 30 words, and its size is 141 bytes.
You can specify more than one file: