News for hackers. Stuff that matters.
Re:What's the one Linux command you wish you knew years ago? by jedbrown on Sunday November 20, 2011 @02:51AM (#3257568)
That has different semantics (it prints one line per file) and can have line length limitations. This has the same semantics as the parent's version, but without line length issues.

  find . -name \*.java -exec cat {} + | wc -l
Re:What's the one Linux command you wish you knew years ago? by X-Istence on Sunday November 20, 2011 @03:26AM (#3257619)
Note that the + may not be portable. I know it doesn't work on older Solaris versions (<10) and HP-UX (from a couple years ago when I last touched it).

Also, find may or may not split the files it finds into multiple invocations.

Re:What's the one Linux command you wish you knew years ago? by Karellen on Sunday November 20, 2011 @08:36AM (#3258060)
Too many invocations of "cat"

find . -name \*.java -print0 | xargs -0 cat | wc -l

Edit: Dammit. Others have already posted this exact version further below. :-(