wc
ShellBeginner In simulator In real LinuxCount lines, words and bytes
Name: wc = word count
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
wc counts lines, words and bytes. The line count is really the number of newline characters, so a last line without one isn't counted.
It mostly ends pipelines that count things, e.g. grep ... | wc -l.
Syntax
wc [OPTION]... [FILE]...Common options
| -l / --lines | Count lines |
| -w / --words | Count words |
| -c / --bytes | Count bytes |
| -m / --chars | Count characters |
| -L / --max-line-length | The length of the longest line |