Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does wc do? And how do you use it to count words in a file? [duplicate]

Tags:

bash

I'm new to the Linux/Unix world but found this decent online resource https://linuxjourney.com that's sort of explains some general command line code. I'm running an Oracle VM with Ubuntu based variant. I'm away from my computer now so I don't know which version but I'm fairly certain it's bash4

like image 435
Ramiel526 Avatar asked Oct 27 '25 14:10

Ramiel526


1 Answers

WC (Word Count) is a simple command line utility that displays the number of words in a file. It is especially useful for text files. Word documents, Libre office documents etc are a different matter.

Simply type 'wc ' and it will output the number of words in the file. If you need more information, type 'man wc' in a terminal and it will show you the full list of options.

like image 102
Kebabman Avatar answered Oct 29 '25 07:10

Kebabman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!