title: How to count lines of code including sub-directories
body: <p>Suppose I want to count the lines of code in a project. If all of the files are in the same directory I can execute:</p>
  
  <pre><code>cat * | wc -l
  </code></pre>
  
  <p>However, if there are sub-directories, this doesn't work. For this to work cat would have to have a recursive mode. I suspect this might be a job for xargs, but I wonder if there is a more elegant solution?</p>