We’ve seen how to count words in PDF files. In this article I’ll tell you how to count words in Unix/Linux files. Unix/Linux systems are generally used by developers who works on lots of coding projects. Many times they need to know the number of words, lines and characters in file or files. And this command you can use with multiple files at once.
The command is ‘wc‘. You can use ‘wc’ plain and simple with any text file. Take a look at this command ‘wc myfile.cpp‘ and it will give count of lines, words and characters in that order. You can see the screenshot below. ‘wc’ offers options to do the counting seperatly. ‘wc -l’ will give you line count, ‘wc -w‘ will give you word count and ‘wc -c‘ or ‘wc -m‘ will give character count. You can give multiple files and ‘wc’ will give count for each file seperately as well as total count of all the files. I’ve shown that in screenshot where I’ve given two files to ‘wc’. Isn’t that too simple? ( Answer – Yeah it is
)








