title: Why does "find . -name *.txt | xargs du -hc" give multiple totals?
body: <p>I have a large set of directories for which I'm trying to calculate the sum total size of several hundred .txt files.  I tried this, which mostly works:</p>
  
  <pre><code>find . -name *.txt | xargs du -hc
  </code></pre>
  
  <p>But instead of giving me one total at the end, I get several.  My guess is that the pipe will only pass on so many lines of find's output at a time, and du just operates on each batch as it comes.  Is there a way around this?</p>
  
  <p>Thanks!
  Alex</p>