Linux/Unix — Checking Word Counts with wc
There are times when you need to know the number of lines that match a search string.
The wc command can be used to count the lines that it receives. For example, the following command lists how many hits in an Apache log file come from a specific IP address:
$ grep 220.127.116.11 /var/log/httpd/access-log | wc -l
The wc command has other uses as well. By default, wc prints the number of lines, words, and bytes in a file:
$ wc /var/log/dmesg
This command list counts for a single file
$ wc /var/log/*.log
With this command you may list single/totals for many files located into the path mentioned.