Linux命令-wc

  • wc命令用于统计指定文本的行数、字数、字节数
  • 格式:wc [参数] 文本
[root@localhost test]# wc test.txt
 6 14 79 test.txt
[root@localhost test]# cat  -n test.txt
     1  linux is good
     2  python is good
     3  hello world hello world
     4  hello linux
     5
     6  hello python
[root@localhost test]#
  • 参数解释
-l    只显示行数
-w    只显示单词书
-c    只显示字节数
原文地址:https://www.cnblogs.com/tdcqma/p/5848959.html