记得用终端(terminal)一句话就能输出来,不记得怎么写了。
求达人分享。
find . -name '*.c' | xargs wc -l {}\;
http://.com/q/1010000000125716
http://.com/q/1010000000611228
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
-------------------------------------------------------------------------------