wc
Linux Commands - Managing Files and Text

wc

wc will provide you with a listing of character count, line count and word count.


Options

-c print character count

-l print line count

-w print word count


This example shows first the word count on the file data and then the character count.


wc -w data


192 data

mike@ub:~$ wc -c data

1756 data