Categories
commands Info

Counting words & lines in a File

wc is used to count no of words and lines in a text file
To count no of characters

$wc -m filename

To count no of words

$wc -w filename

to count no of lines in the file use

$wc -l filename

refer wc manual for more info on wc or

$man wc