I'd like to split a file into chunks of maximum N bytes, while keeping complete lines.
Something like the following breaks up first and last lines of each chunk on exact byte boundries.
split -b 100m -d data.tsv data.tsv.
If you use the -l (a lowercase L) option, replace linenumber with the number of lines you'd like in each of the smaller files (the default is 1,000). If you use the -b option, replace bytes with the number of bytes you'd like in each of the smaller files.
To split a file equally into two files, we use the '-n' option. By specifying '-n 2' the file is split equally into two files.
For files over the 2GB size limit, the standard Unix/Linux command "split" can be used to break up the file. For the large size product example, "split -b 1024m BIG-File-6_plus-GB-in-total-size. tgz BIG-File-6_plus-GB-in-total-size". The "-b 1024m" splits the original file into 1GB chunks.
Open the Zip file. Open the Tools tab. Click the Split Size dropdown button and select the appropriate size for each of the parts of the split Zip file. If you choose Custom Size in the Split Size dropdown list, another small window will open and allow you to enter in a custom size specified in megabytes.
Sounds like a job for split -C
:
split -C 100m -d data.tsv data.tsv.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With