Method 1[]
awk 'END {print NR}' *.java
Method 2[]
wc -l *.php
For windows Command line:
for %G in (*.sql) do find /c /v "_+_" %G
For linux Command Line:
wc -l *.sh
Method 3[]
cat *.java | wc -l
Method 4[]
Using find to generate a list of files, useful when files are in sub directories.
wc -l `find -name '*.java'`