To measure the lines of code in a codebase (on a standard Linux machine):
The
find -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.hpp" | while read i; do wc -l "$i"; done | cut -d " " -f 1 | awk '{total = total + $1}END{print total}'
The
while read is needed to join together file names with spaces (versus using -exec wc -l {} \;).
Archives



