number of lines of code in a directory

I just wanted to find the number of lines of java code in a directory i.e. recursively..

find . -type f -name ‘*java’ -print0 | wc -l –files0-from=-

Output:
.
.
56 ./App.java
550 total

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">