Although the “lines of code” in a project is not the worlds most useful metric. Curiosity sometimes gets the better of us and after many days / weeks of typing you think “gee I wonder exactly how many lines of code are in that project?”.
Wonder no more! By embracing the power of the command line you can easily count the lines in every file recursively. Simply execute the following line in the directory of your project (changing .php to the file extension of the files you would like to count the line of):
find . -name ‘*.php’ | xargs wc -l
This will give you a simple breakdown for your project that looks similar to below:
Sure its not the most detailed or elegant report but its quick and gives you a code count of your project with a minimum of fuss.