wc (word count linux command tutorials)

 

  • wc stands for word count.

Syntax

wc file_name

 

  • This command will you the Line count, Word count and Bytes count of the given file

  • Contents of test.txt

 

  • The following snapshot shows the output given by wc command. The first number gives the number of lines, the second number gives the number of words and third number gives the number of bytes.

 

  • As shown in above result test.txt file includes 3 lines, 7 words and 55 characters.

border