tldr/pages/common/wc.md

25 lines
438 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.
> More information: <https://www.gnu.org/software/coreutils/wc>.
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`