title: List all files in a directory with a certain extension
body: <p>Let's say I want to list all <code>php</code> files in a directory including sub-directories, I can run this in bash:</p>
  
  <p><code>ls -l $(find. -name *.php -type f)</code></p>
  
  <p>The problem with this is that if there are no <code>php</code> files at all, the command that gets executed is <code>ls -l</code>, listing all files and directories, instead of none.</p>
  
  <p>This is a problem, because I'm trying to get the combined size of all <code>php</code> files using</p>
  
  <p><code>ls -l $(find . -name *.php -type f) | awk '{s+=$5} END {print s}'</code></p>
  
  <p>which ends up returning the size of all entries in the event that there are no files matching the <code>*.php</code> pattern.</p>
  
  <p>How can I guard against this event?</p>