title: What is the Windows/DOS equivalent of the *nix head and tail commands?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/187587/looking-for-a-windows-equivalent-of-the-unix-tail-command">Looking for a windows equivalent of the unix tail command</a><br>
    <a href="https://stackoverflow.com/q/1295068">Windows equivalent of the &#39;tail&#39; command</a></p>
  </blockquote>
  
  
  
  <p>I need to store the first and last 100 lines of a ginormous (multi-gigabyte) XML file. On *nix, I would simply do this:</p>
  
  <pre><code>head -n 100 foo.xml &gt; foo.txt
  tail -n 100 foo.xml &gt;&gt; foo.txt
  </code></pre>
  
  <p>How can I do the same from a Windows/DOS command prompt?</p>
  
  <p>NOTE: I would prefer not to have to install anything.</p>