Low Orbit Flux Logo 2 F

Linux Command - wc

The Linux command wc is used to find the word count or line count of a file. It also does byte and character counts.

Check the number of lines in a file:



wc -l test.txt

Check the number of words in a file:



wc -w test.txt

Check the number of bytes in a file:



wc -c test.txt

Check the number of chars in a file:



wc -m test.txt