Lines of Code?
Published May 25th, 2006 in UNIXWant to know how many lines of code your project is? Run this command:
find . -name '*.[hm]' -exec cat {} \; | wc -l
Note: Header files in your project build directories can skew the result, you might want to empty out your build directories before running this. Change the file extensions in [hm] if you want to run this one something other than a Cocoa project.
Have you heard about SLOCCount? http://www.dwheeler.com/sloccount/
It does that job a bit better, since it doesn’t count comments and blank lines, and even prints out a few estimations about the project effort, schedule and costs.