`wc`

学习地址:

The wc(word count) command in Unix/Linux operating systems is used to find out number of newline count, word count, byte and characters count in a files specified by the file arguments.

The syntax of wc command as shown below:

1
$ wc [options] filenames

The following are the options and usage provided by the command:

1
2
3
4
5
wc -l : Prints the number of lines in a file.
wc -w : prints the number of words in a file.
wc -c : Displays the count of bytes in a file.
wc -m : prints the count of characters from a file.
wc -L : prints only the length of the longest line in a file.