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:
Example
# 统计文件test.txt中的字数wc -w test.txt # 统计文件test.txt中的字节数wc -c test.txt # 统计文件test.txt中的行数wc -l test.txt
This article is reprinted from https://xugaoxiang.com/2022/06/19/linux-cmds-62-wc/
This site is for inclusion only, and the copyright belongs to the original author.