WC(1) User Commands WC(1)

# [NAME](#NAME)

wc - word, line, and byte or character count

# [SYNOPSIS](#SYNOPSIS)

**wc** \[*OPTION*]... \[*FILE*]...  
**wc** \[*OPTION*]... *--files0-from=F*

# [DESCRIPTION](#DESCRIPTION)

Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is specified. A word is a nonempty sequence of non white space delimited by white space characters or by start or end of input.

With no FILE, or when FILE is -, read standard input.

The options below may be used to select which counts are printed, always in the following order: newline, word, character, byte, maximum line length.

[**-c, --bytes**](#c,)

print the byte counts

[**-m, --chars**](#m,)

print the character counts

[**-l, --lines**](#l,)

print the newline counts

[**--debug**](#debug)

indicate what line count acceleration is used

[**--files0-from=F**](#files0)

read input from the files specified by NUL-terminated names in file F; If F is -, read names from standard input

[**-L, --max-line-length**](#L,)

print the maximum display width

[**-w, --words**](#w,)

print the word counts

[**--total=WHEN**](#total=WHEN)

when to print a line with total counts; WHEN can be: auto, always, only, never

[**--help**](#help)

display this help and exit

[**--version**](#version)

output version information and exit

# [AUTHOR](#AUTHOR)

Written by Paul Rubin and David MacKenzie.

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs to: &lt;bug-coreutils@gnu.org&gt;.  
Report any translation bugs to: &lt;https://translationproject.org/team/&gt;.  
GNU coreutils home page: &lt;https://www.gnu.org/software/coreutils/&gt;  
General help using GNU software: &lt;https://www.gnu.org/gethelp/&gt;

# [COPYRIGHT](#COPYRIGHT)

Copyright © 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;.  
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

# [SEE ALSO](#SEE_ALSO)

Full documentation &lt;https://www.gnu.org/software/coreutils/wc&gt;  
or available locally via: info '(coreutils) wc invocation'

October 2026 GNU coreutils 9.12

---

Document: wc(1) from coreutils 9.12-r5 (Chainguard OS)
Source: https://git.savannah.gnu.org/git/coreutils.git
