wc命令:

print newline, word, and byte counts for each file统计文件的行数、字符数和字节数。

使用者权限:

所有使用者

语法格式:

wc [OPTION]... [FILE]...

wc [OPTION]... --files0-from=F

常用选项:

-c:统计字节数

-w:统计字数

-l:统计行数

-m:统计字符数

实例

[root@www1 ~]# wc test666.txt
 19  31 107 test666.txt
[root@www1 ~]# wc -l test666.txt
19 test666.txt
[root@www1 ~]# wc -m test666.txt
107 test666.txt
[root@www1 ~]# wc -w test666.txt
31 test666.txt
[root@www1 ~]# wc -c test666.txt
107 test666.txt
[root@www1 ~]#