title: When to use xargs when piping?
body: <p>I am new to bash and I am trying to understand the use of <code>xargs</code>, which is still not clear for me. For example:</p>
  
  <pre><code>history | grep ls
  </code></pre>
  
  <p>Here I am searching for the command <code>ls</code> in my history. In this command, I did not use <code>xargs</code> and it worked fine. </p>
  
  <pre><code>find /etc - name "*.txt" | xargs ls -l
  </code></pre>
  
  <p>I this one, I had to use <code>xargs</code> but I still can not understand the difference and I am not able to decide correctly when to use <code>xargs</code> and when not.</p>