The wc Command
In sum, the wc command counts words and provides you with a summary of what is found. Unix will report to you how many words are in a particular file. The wc stands for word count. When you want to see how many words are typed in a file, you simply need to execute the command and then the filename with its absolute or relative path. You will be shown the word count as well as the number of bytes, words, and lines in files.
The wc command is an excellent way to provide current statistics on a file you may want to work with. For example, if you wanted to issue the tail command on a file you think may be very large, you can use the wc command on a file to quickly see how many lines are in it. You can then use the tail command to jump ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access