Linux wc 统计

Written by

in

$ wc –help
用法:wc [选项]… [文件]…
Print newline, word, and byte counts for each FILE, and a total line if
more than one FILE is specified. With no FILE, or when FILE is -,
read standard input.
-c, –bytes print the byte counts
-m, –chars print the character counts
-l, –lines print the newline counts
-L, –max-line-length print the length of the longest line
-w, –words print the word counts
–help 显示此帮助信息并退出
–version 输出版本信息并退出
例如:
统计tcp的连接数:netstat -an|grep tcp | wc -l

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *