Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

wc

v(uutils coreutils) 0.1.0

Options

--bytes, -c

wc-help-bytes

--chars, -m

wc-help-chars

--files0-from=<F>

wc-help-files0-from

--lines, -l

wc-help-lines

--max-line-length, -L

wc-help-max-line-length

--total=<WHEN>

wc-help-total

--words, -w

wc-help-words

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}}

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.