wc [options] [file...]Arguments explained
- -l counts lines.
- -w counts words.
- -c counts bytes.
- -m counts characters.
Common examples
wc -l access.logShows how many lines are in the log.
grep -i error app.log | wc -lCounts error lines from grep output.
| Field | Details |
|---|---|
| Command | wc |
| Category | Viewing Content |
| Primary use | Counts lines, words, bytes, or characters. |
| Syntax | wc [options] [file...] |