Count lines in a log file.
wc -l access.logCount lines, words, and bytes. Use -l for a line count only.
wc [OPTION]... [FILE]...Count lines in a log file.
wc -l access.logCount words in a text file.
wc -w README.md| Option / clause | Description |
|---|---|
-l, --lines | Print newline counts. |
-w, --words | Print word counts. |
-c, --bytes | Print byte counts. |
-m, --chars | Print character counts. |
-L, --max-line-length | Print the maximum line width. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.