title: How to remove the filename from the end of the du -h output
body: <p>take the example:</p>
  
  <pre><code>$ du -h file_size.txt
  112K file_size.txt
  </code></pre>
  
  <p>How would i remove the filename from the output of du -h</p>
  
  <p>I have tried to use sed to search for a string (the filename) and replace it with nothing, but it hasnt worked (command below)</p>
  
  <pre><code>du -h file_size.txt | sed 's/ 'file_size.txt'//'
  </code></pre>
  
  <p>Could someone please point out why this wont work, or perhaps a better way to do it?</p>
  
  <p>Regards</p>
  
  <p>Paul</p>