Word Count

Print newline, word, and byte counts

text
counting
statistics

Command

wc

Explanation

wc counts lines, words, and characters in files.

Examples

Count lines, words, characters

wc file.txt

Count lines only

wc -l file.txt

Count words only

wc -w file.txt