Linux: Count lines of code
I found a cool programm, that can count lines of code for several programming languages.
You can find it here: http://cloc.sourceforge.net/
Install
On a debian based box, installing is very easy:
sudo apt-get install cloc
Howto
Usage:
cloc --help
File/s:
cloc *java
Directory:
cloc src/
Example
I counted some of my Java lines:
src$ cloc *.java 13 text files. 13 unique files. 0 files ignored. http://cloc.sourceforge.net v 1.53 T=0.5 s (26.0 files/s, 2706.0 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Java 13 189 140 1024 ------------------------------------------------------------------------------- SUM: 13 189 140 1024 -------------------------------------------------------------------------------
No related posts.