Back to Blog
Arnošt Havelka

WC - Count Words & Chars

Use wc to count words and characters in files.

Start Interactive Lesson
WC - Count Words & Chars

Word Count with wc

The wc (word count) command is a simple but powerful utility for analyzing text data.

Counting Words and Characters

By default, wc shows lines, words, and byte counts. You can use flags to get specific data:

Usage:wc-w
-w
Count words
-c
Count characters

Knowledge Check

1 / 1

Which flag counts words?

References

These Microsoft Learn and Windows documentation links provide authoritative details for the commands used in this article.

Up Next

SORT - Order Data

Sort lines of text files.