Wednesday 24 August 2011

Recursive count lines number in large programming projects.

To count lines number from for example all *.java files in directory there is simple solution with "wc" command.

wc -l *.java

If you need to count lines number of large project with subdirectories etc. you can use
combination of "wc" and "find" command:

wc -l `find . -name \*.java -print`

No comments:

Post a Comment