Linux common commands-62: wc

The wc command counts the number of bytes, words, and lines in the specified file, and displays the statistics for output.

Syntax format: wc [parameter] [file]

Common parameters:


 # 统计文件test.txt中的字数wc -w test.txt # 统计文件test.txt中的字节数wc -c test.txt # 统计文件test.txt中的行数wc -l test.txt

This article is reprinted from
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment

Your email address will not be published.