wc (short for word count)
is a Linux program that displays a count of lines (newline characters,
to be precise), words, and bytes for each file you specify. The program
prints three numbers for each file you specify. For instance, 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 files:
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 files:
NOTE – use the -l option to print only the line count, the -w to print only the word count, and -c to print only the bytes count.
Post a Comment