Manual / wc
wc(1)
| WC(1) | General Commands Manual | WC(1) |
NAME
wc - count lines, words and bytes
SYNOPSIS
wc [-lwcm] [file...]
DESCRIPTION
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.
- -l
- Count newline bytes. A final unterminated line does not add one.
- -w
- Count words.
- -c
- Count bytes.
- -m
- 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.
FILES
/usr/man/WC this page
SEE ALSO
DIAGNOSTICS
Exit status is 0 on success, 1 if any file cannot be opened, 2 for usage errors.
BUGS
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 |