Linux : split big log file by size or date Hint

split -b 1GB test.log

 

< test.log head -n $(cat test.log | grep -m1 -n "2021-07-11" -a | cut -d: -f1) | tail -n +$(cat test.log | grep -m1 -n "2021-07-10" -a | cut -d: -f1) > test.log.20210710

 

awk 'NR >= 10 && NR <= 100' test.log >new.log.100