wc <file>Prints line, word and byte counts.
Example
wc report.txtCounts lines, words, characters and bytes in files or input.
sudo apt install coreutilswc <file>Prints line, word and byte counts.
Example
wc report.txtwc -l <file>Counts lines.
Example
wc -l targets.txtwc -w <file>Counts words.
Example
wc -w essay.txtwc -c <file>Counts bytes.
Example
wc -c payload.binwc -m <file>Counts characters, which differs from bytes for multi-byte text.
Example
wc -m unicode.txtwc -L <file>Prints the length of the longest line (GNU).
Example
wc -L app.logwc -l *.txtCounts several files and adds a total.
Filters or counts adjacent duplicate lines — usually paired with sort.
Searches text for lines matching a pattern, with regular expressions, recursion and context.
Concatenates files and prints them to standard output — view, combine and create files.
A pager for viewing large files and command output one screen at a time, with search and follow mode.
Prints the first lines or bytes of files — quick previews of logs and data.
Prints the last lines of files and follows them as they grow — the standard way to watch logs.