title: How do I limit (or truncate) text file by number of lines?
body: <p>I would like to use a terminal/shell to truncate or otherwise limit a text file to a certain number of lines. </p>
  
  <p>I have a whole directory of text files, for each of which only the first ~50k lines are useful. </p>
  
  <p>How do I delete all lines over 50000?</p>