Answers
find . -name '*.c' | xargs wc -l {}\;
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