一、說明
wc 指令用來統計檔案的行數、位元組數、單詞數、字元數的資訊。
二、參數
1、-l 統計行數。
2、-L 統計列印最長那一行的長度。
3、-c 統計檔案的位元組數。
4、-w 統計檔案的單詞數。
5、-m 統計檔案的字元數。
[[email protected] test]#
[[email protected] test]# wc -c more.txt ## 統計檔案的位元組數
90332 more.txt
[[email protected] test]# wc -w more.txt ## 統計檔案的單詞數量
12658 more.txt
[[email protected] test]# wc -m more.txt ## 統計字元數
90190 more.txt
[[email protected] test]# wc -l more.txt ## 統計行數
999 more.txt
[[email protected] test]# wc -L more.txt ## 列印最長的那一行的長度
151 more.txt
[[email protected] test]#