1. 语法与选项

Short OptionLong OptionOption Description
-c –bytes print the byte counts
-m –chars print the character counts
-l –lines print the newline counts
  –files0-from=F read input from the files specified by NUL-terminated names in file F
-L –max-line-length print the length of the longest line
-w –words print the word counts

2. 实例

   打印文件的行数,单词数,字符串数

$wc file

结果:

X  Y  Z  file
#X 行数
#Y 单词数
#Z 字符数

 

单独打印行数

$ wc -l file

 

 

 

 

posted on 2014-06-12 16:42  一天不进步,就是退步  阅读(2541)  评论(0编辑  收藏  举报