The wc (word count) command counts lines, words, and bytes of its input. The default output is to show all three:
$ wc .bashrc 101 550 3391 .bashrc
In this example, our .bashrc file has 101 lines, 550 space-delimited words, and 3,391 bytes. You can print only one of these numbers with the -l, -w, and -c options, respectively.
If you provide more than one file for wc to examine, it will also print a total:
$ wc -c .bashrc .bash_profile 3391 .bashrc 471 .bash_profile 3862 total
Be careful to distinguish between bytes and characters. If you actually need to count the number of ...