wc 有四个参数可选,分别是l,c,m,w
wc -l filename 报告行数
wc -c filename 报告字节数
wc -m filename 报告字符数
wc -w filename 报告单词数
查看文件的字节数、字数、行数
wc test.txt
# 输出结果
7 8 70 test.txt
# 行数 单词数 字节数 文件名
[root@localhost test]# wc -l test.txt
7 test.txt
[root@localhost test]# cat test.txt |wc -l
7