maux
Star on GitHub Buy me a coffee

Manual / wc

wc(1)

WC(1) General Commands Manual WC(1)

wc - count lines, words and bytes

wc [-lwcm] [file...]

Wc provides a count of the words and text lines for each argument file; maux also counts bytes, and does not separately count roff control lines. A word is a sequence of characters bounded by a space, a tab, a newline or the beginning or end of input.

Count newline bytes. A final unterminated line does not add one.
Count words.
Count bytes.
Same as -c on this single-byte system.

The selected columns are printed in line, word, byte order. Without options all three are printed. Without files the standard input is read. Two or more file operands also produce a total line. A file which cannot be opened is reported and skipped.

/usr/man/WC this page

cat(1), licenses(1)

Exit status is 0 on success, 1 if any file cannot be opened, 2 for usage errors.

Counts saturate at 65535. Text whitespace is maux high-bit space, tab and CR; low-ASCII LF files need conversion before their line/word counts have Unix meaning.

September 19, 2026 maux