⌘K
Options (5)
-l, --linesbooleanCount all lines in a file
Example:
wc {{[-l|--lines]}} {{path/to/file}}-w, --wordsbooleanCount all words in a file
Example:
wc {{[-w|--words]}} {{path/to/file}}-c, --bytesbooleanCount all bytes in a file
Example:
wc {{[-c|--bytes]}} {{path/to/file}}-m, --charsbooleanCount all characters in a file (taking multi-byte characters into account)
Example:
wc {{[-m|--chars]}} {{path/to/file}}-L, --max-line-lengthbooleanCount the length of the longest line in number of characters
Example:
wc {{[-L|--max-line-length]}} {{path/to/file}}Examples (6)
Count all lines in a file
wc [-l|--lines] path/to/fileCount all words in a file
wc [-w|--words] path/to/fileCount all bytes in a file
wc [-c|--bytes] path/to/fileCount all characters in a file (taking multi-byte characters into account)
wc [-m|--chars] path/to/fileCount all lines, words, and bytes from `stdin`
find . | wcCount the length of the longest line in number of characters
wc [-L|--max-line-length] path/to/filemade by @shridhargupta | data from tldr-pages