tldr/pages/common/wc.md

25 lines
471 B
Markdown
Raw Normal View History

2013-12-25 11:17:18 +00:00
# wc
2019-11-14 16:58:45 +00:00
> Count lines, words, or bytes.
2021-03-30 14:48:08 +01:00
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/wc-invocation.html>.
2013-12-25 11:17:18 +00:00
- Count lines in file:
2013-12-25 11:17:18 +00:00
`wc -l {{file}}`
- Count words in file:
`wc -w {{file}}`
- Count characters (bytes) in file:
2013-12-25 11:17:18 +00:00
`wc -c {{file}}`
- Count characters in file (taking multi-byte character sets into account):
2013-12-25 11:17:18 +00:00
`wc -m {{file}}`
- Use standard input to count lines, words and characters (bytes) in that order:
`{{find .}} | wc`