The Code line count tool Cloc, it can not only count the number of lines of code, but also automatically filter out the comments in the code, the use is also very convenient, strongly recommended.
Installation is very convenient, Ubuntu directly Udo Apt-get install Cloc can be
Let's use MySQL to make an example, first enter the MySQL source code folder:
[email protected] ~/aproject $ cd mysql-5.6.19/[email protected] ~/aproject/mysql-5.6.19 $ cloc. Defined (% Hash) is deprecated At/usr/bin/cloc line 1277. (maybe you should just omit the defined ()?) 13804 text files. 13319 unique files. 9686 files Ignored.http://cloc.sourceforge.net v 1.53 t=17.0 s (241.0 files/s, 143571.1 lines/s)------------------------ --------------------------------------------------------Language Files Blank Comment Code--------------------------------------------------------------------------------C + + 1153 187301 209441 937741C 519 36218 40159 457187c/c++ Header 1389 51302 114475 206003Java 612 13120 19048 54595Perl 142 9515 6892 30931Bourne Shell 142 5293 5848 28855XML 965 1242 7847SQL 23 764 822 5791Python 4 346 271 1264Teamcenter def 135 1032Pascal 8 0 1403 969YACC 2 810HTML 5 524lex 3 219 102 524D 9 59-9 494Javascript 1 131make 3 39 26 108m4 1 7 75DOS Batch 8 36 69awk 1 2 54Bourne Again Shell 1 8 28YAML 1 0 0 16SKILL 1 8 16Visual Basic 1 0 0----------------------------------------------------------- ---------------------sum:4097 305447 400185 1735076--------------------- -----------------------------------------------------------
Get.
Recommend a line of code statistics tool Cloc