How to Split large CSV file into smaller files

To split a large CSV file into smaller parts, you can use the split command

The above command will split file access_log.csv into smaller parts, each part will have the header from the CSV file.

split -l 50000 means we will have 50,000 lines per file. If you need a different number of lines per file, you can change the number.

To rename all generated log files numerically, use the following command

Back to split

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *