WC(1)
β¨ WC(1) β the count-everything bestie of the manual pages β¨
okay so, <rainbow>wc</rainbow> β short for word count, but honestly? she does so much more than words. Manual section 1, General Commands Manual, and she's literally the moment. π
πΈ NAME πΈ
wc β print newline, word, and byte counts for each FILE, plus a total line if you hand her more than one FILE. (Yes bestie, she keeps score. Obsessed. π)
π¦ SYNOPSIS π¦
wc [OPTION]... [FILE]...
π DESCRIPTION π
Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is specified. That's it, that's the whole vibe. Give her files, she gives you numbers. Give her a whole bunch of files and she'll add up a total at the end like the responsible main character she is. π
β¨ OPTIONS β¨
-c,--bytesβ print the byte counts π«Ά-m,--charsβ print the character counts--files0-fromF β read input from the files specified by NUL-terminated names in file F. if F is-then read the names from standard input π-l,--linesβ print the newline counts-L,--max-line-lengthβ print the length of the longest line--totalWHEN β when to print a line with total counts. WHEN can be:auto,always,only,never-w,--wordsβ print the word counts π-h,--helpβ print help-V,--versionβ print version- [files] β the files, bestie
π VERSION π
v(uutils coreutils) 0.12.0
π₯ EXAMPLES π₯
Count all lines in a file:
wc [-l|--lines] path/to/file
Count all words in a file:
wc [-w|--words] path/to/file
Count all bytes in a file:
wc [-c|--bytes] path/to/file
Count all characters in a file (taking multi-byte characters into account):
wc [-m|--chars] path/to/file
Count all lines, words, and bytes from stdin:
find . | wc
Count the length of the longest line in number of characters:
wc [-L|--max-line-length] path/to/file
These examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. heads up though: as uutils is a work in progress, some of these examples might fail. π not a vibe, but we're being honest about it.
and that's the whole page, bestie π this one's from uutils coreutils, version 0.12.0, dated 2026-09-25 β go count something and slay. π§βπ
π¦ where this page comes from
- ubuntu stonking: rust-coreutils 0.12.0-1ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms