Skip to main content
Kill -9 Club
Sign in

wc

TextPackage: coreutils

Counts lines, words and bytes. wc -l on the output of a grep or an ls turns a list into a number — the shape a check takes in a script.

What its options do in the lessons

From the same glossary the lessons render under their commands, so the two cannot disagree.

wc -l
Counts lines.
wc -c
Counts bytes rather than lines. The form that shows a file emptied by a redirection, where wc -l would also print zero for a file truncated mid-line.

Lessons that teach it

wc — command reference | Kill -9 Club