Quick links About wc Syntax Examples Related commands Linux / Unix main page About wc Short for word count, wc displays a count of lines, words, and characters in a file. Syntax wc [-c | -m | -C ] [-l] [-w] [ file ... ]
| -c | Count bytes. |
| -m | Count characters. |
| -C | Same as -m. |
| -l | Count lines. |
| -w | Count words delimited by white space characters or new line characters. Delimiting characters are Extended Unix Code (EUC) characters from any code set defined by iswspace() |
| file | Name of file to word count. |
Examples wc myfile.txt - Displays information about the file myfile.txt. Below is an example of the output. 5 13 57 myfile.txt 5 = Lines 13 = Words 57 = Characters
Related commands cksum |