sed -n '1001,2000p;2001q' mysql.log > 1001-2000.log
stackoverflow.com/a/83347
How do I extract the first N lines from a big text file to a separate file via Bash?