I have a file archive.tar.gz
, which is 38 GB in size. I want to store it in chunks of maximum 1 GB.
To do that, I would like to split it into sub-files archive_0.tar.gz
, archive_1.tar.gz
, ... so that each sub-file is individually readable (and not just the original file cut at the 1024-th byte).
In other words, each archive_x.tar.gz
file should be a valid tar.gz
file.
How can I do this? Preferably using shell scripting, or Python.