How to split a zipfile into smaller zipfiles
There is a generic command in Linux actually called split. It supports extensions and a max size and even a max line numbers option:
generate suffixes of length N (default 2)
append an additional SUFFIX to file names
put SIZE bytes per output file
put at most SIZE bytes of records per output file
-d use numeric suffixes starting at 0, not alphabetic
put NUMBER lines/records per output file
And to put them together you can simply
cat them. 3 examples:
cat f1 f2 f3 > original.zip
cat dir/* > original.zip
for file in *; do cat $file >>original.zip; done
Now I want to extract the data of the archive "archive1.zip" without creating the 25 GB zipfile again.
unzip -l ARCHIVE_NAME will list the files in a zip. This works on the whole zip to extract 1 file:
unzip -j file.zip "dir/in/archive/file.txt"
and will restore "dir/in/archive/file.txt" in the current directory. I have not seen proof on this working on a part of the zip file. And then it will be a hit/miss scenario: the file might be partly inside the previous and following part. I doubt it is possible without recreating the file; but that could be done "on the fly".