title: Split text file into smaller multiple text file using command line
body: <p>I have multiple text file with about 100,000 lines and I want to split them into smaller text files of 5000 lines each. </p>
  
  <p>I used:</p>
  
  <pre><code>split -l 5000 filename.txt
  </code></pre>
  
  <p>That creates files:</p>
  
  <pre><code>xaa
  xab
  aac
  xad
  xbe
  aaf
  </code></pre>
  
  <p>files with no extensions. I just want to call them something like:</p>
  
  <pre><code>file01.txt
  file02.txt
  file03.txt
  file04.txt
  </code></pre>
  
  <p>or if that is not possible, i just want them to have the ".txt" extension. </p>