开发者

how can i calculate total no of code line in whole project?

see i want to count total no of code line, comment line in my whole project so is there any command or script in linux machine f开发者_开发百科or that purpose.

Is there any script for counting no of code in particular directory?

NOTE : my code is written in c langauge


Use CLOC.


$ wc *.c *.h
   17    41   234 file1.c
   33    83   868 header1.h
 ...
   43   189  1440 headerM.h
   10    36   300 fileN.c
 3271 11541 78807 total

So my directory has 3271 lines, 11541 words, and 78807 characters in files with .c or .h extensions.

wc should be available in any UN*X command line or downloadable and installable for Windows.


Try SLOCCount: http://www.dwheeler.com/sloccount/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜