如何 查看项目有多少行代码 ?


记得用终端(terminal)一句话就能输出来,不记得怎么写了。

求达人分享。

terminal

釘宮病患者 10 years, 8 months ago
shabi answered 10 years, 8 months ago


 find . -name '*.c' | xargs wc -l {}\;

http://segmentfault.com/q/1010000000125716

Annita answered 10 years, 8 months ago

cloc your-source-dir

需要 安装cloc

效果如下


 100 text files.
     100 unique files.
       0 files ignored.

http://cloc.sourceforge.net v 1.60  T=0.44 s (225.1 files/s, 29056.1 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
PHP                             60           1356            762           5791
Javascript                      35            355             95           2081
LESS                             5            455            287           1727
-------------------------------------------------------------------------------
SUM:                           100           2166           1144           9599
-------------------------------------------------------------------------------

DR300 answered 10 years, 8 months ago

Your Answer