mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-15 04:59:56 +00:00
Move pages under tldr, lint run.sh, update docs
This commit is contained in:
33
tldr/wc
Normal file
33
tldr/wc
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# wc
|
||||
|
||||
> Count lines, words, and bytes.
|
||||
> More information: <https://www.gnu.org/software/coreutils/wc>.
|
||||
|
||||
- Count all lines in a file:
|
||||
|
||||
`wc --lines {{path/to/file}}`
|
||||
|
||||
- Count all words in a file:
|
||||
|
||||
`wc --words {{path/to/file}}`
|
||||
|
||||
- Count all bytes in a file:
|
||||
|
||||
`wc --bytes {{path/to/file}}`
|
||||
|
||||
- Count all characters in a file (taking multi-byte characters into account):
|
||||
|
||||
`wc --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 --max-line-length {{path/to/file}}`
|
||||
Reference in New Issue
Block a user