Split zip into smaller zip files












0















I need weekly to upload bunch of pdf file to grading platform, in the form of zip, but the website has limit of 250Mb per zip file, and it takes me too much time to split the zip I have into smaller zip files.



What is the simplest way to split a zip into chunks with max size?



A way that would work on other unix-like platform (like my mac at work) will be grate.



I'm looking an existing command that will do it, or some simple python (or node, or any other simple to use languages) module that will help we write a small script that does it.










share|improve this question


















  • 1





    I think this might be useful superuser.com/questions/336219/…

    – Inmate4587
    Jan 4 at 12:17
















0















I need weekly to upload bunch of pdf file to grading platform, in the form of zip, but the website has limit of 250Mb per zip file, and it takes me too much time to split the zip I have into smaller zip files.



What is the simplest way to split a zip into chunks with max size?



A way that would work on other unix-like platform (like my mac at work) will be grate.



I'm looking an existing command that will do it, or some simple python (or node, or any other simple to use languages) module that will help we write a small script that does it.










share|improve this question


















  • 1





    I think this might be useful superuser.com/questions/336219/…

    – Inmate4587
    Jan 4 at 12:17














0












0








0








I need weekly to upload bunch of pdf file to grading platform, in the form of zip, but the website has limit of 250Mb per zip file, and it takes me too much time to split the zip I have into smaller zip files.



What is the simplest way to split a zip into chunks with max size?



A way that would work on other unix-like platform (like my mac at work) will be grate.



I'm looking an existing command that will do it, or some simple python (or node, or any other simple to use languages) module that will help we write a small script that does it.










share|improve this question














I need weekly to upload bunch of pdf file to grading platform, in the form of zip, but the website has limit of 250Mb per zip file, and it takes me too much time to split the zip I have into smaller zip files.



What is the simplest way to split a zip into chunks with max size?



A way that would work on other unix-like platform (like my mac at work) will be grate.



I'm looking an existing command that will do it, or some simple python (or node, or any other simple to use languages) module that will help we write a small script that does it.







zip






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 4 at 12:07









Barak OhanaBarak Ohana

31




31








  • 1





    I think this might be useful superuser.com/questions/336219/…

    – Inmate4587
    Jan 4 at 12:17














  • 1





    I think this might be useful superuser.com/questions/336219/…

    – Inmate4587
    Jan 4 at 12:17








1




1





I think this might be useful superuser.com/questions/336219/…

– Inmate4587
Jan 4 at 12:17





I think this might be useful superuser.com/questions/336219/…

– Inmate4587
Jan 4 at 12:17










1 Answer
1






active

oldest

votes


















0














You need zipsplit which is part of the zip package:



zipsplit -n $(( 250 * 1024 * 1024 )) your_zipfile.zip


It splits an existing zipfile into smaller chunks. The size of each
chunk can be supplied via the -n switch. It defaults to
360000 because years ago floppy disks had a capacity of 360 kB.



Another option would be to create the chunks in the first place while
zipping (see zip, especially the -s switch) and thus avoiding
the separate zipsplit step:



zip -s 250m new-zipfile file1 file2 file3...


Unfortunately unzip new-zipfile.zip cannot handle the chunks created
via zip -s so you have to join them on the target side before unzipping:



zip --fix new-zipfile --out joined-zipfile
unzip joined-zipfile





share|improve this answer


























  • the files created will be real zip file of chunks (means that later on I will need to put them together) of the original one? If my original file contains f1.pdf (25MB) ,f2.pdf (20MB) and f3.pdf (8MB) and the limit is 50MB per zip file I want the output to be two zip files, one with f1.pdf and f2.pdf and one with f3.pdf.

    – Barak Ohana
    Jan 4 at 13:45











  • @BarakOhana zipsplit will create a number of stand-alone zipfiles each of which can be unzipped on its own (no joining needed). zip -s on the other hand creates a number of files that must be joined via zip --fix because unzip cannot currently handle these files. I'd go with zipsplit in your case.

    – PerlDuck
    Jan 4 at 14:37











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106903%2fsplit-zip-into-smaller-zip-files%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














You need zipsplit which is part of the zip package:



zipsplit -n $(( 250 * 1024 * 1024 )) your_zipfile.zip


It splits an existing zipfile into smaller chunks. The size of each
chunk can be supplied via the -n switch. It defaults to
360000 because years ago floppy disks had a capacity of 360 kB.



Another option would be to create the chunks in the first place while
zipping (see zip, especially the -s switch) and thus avoiding
the separate zipsplit step:



zip -s 250m new-zipfile file1 file2 file3...


Unfortunately unzip new-zipfile.zip cannot handle the chunks created
via zip -s so you have to join them on the target side before unzipping:



zip --fix new-zipfile --out joined-zipfile
unzip joined-zipfile





share|improve this answer


























  • the files created will be real zip file of chunks (means that later on I will need to put them together) of the original one? If my original file contains f1.pdf (25MB) ,f2.pdf (20MB) and f3.pdf (8MB) and the limit is 50MB per zip file I want the output to be two zip files, one with f1.pdf and f2.pdf and one with f3.pdf.

    – Barak Ohana
    Jan 4 at 13:45











  • @BarakOhana zipsplit will create a number of stand-alone zipfiles each of which can be unzipped on its own (no joining needed). zip -s on the other hand creates a number of files that must be joined via zip --fix because unzip cannot currently handle these files. I'd go with zipsplit in your case.

    – PerlDuck
    Jan 4 at 14:37
















0














You need zipsplit which is part of the zip package:



zipsplit -n $(( 250 * 1024 * 1024 )) your_zipfile.zip


It splits an existing zipfile into smaller chunks. The size of each
chunk can be supplied via the -n switch. It defaults to
360000 because years ago floppy disks had a capacity of 360 kB.



Another option would be to create the chunks in the first place while
zipping (see zip, especially the -s switch) and thus avoiding
the separate zipsplit step:



zip -s 250m new-zipfile file1 file2 file3...


Unfortunately unzip new-zipfile.zip cannot handle the chunks created
via zip -s so you have to join them on the target side before unzipping:



zip --fix new-zipfile --out joined-zipfile
unzip joined-zipfile





share|improve this answer


























  • the files created will be real zip file of chunks (means that later on I will need to put them together) of the original one? If my original file contains f1.pdf (25MB) ,f2.pdf (20MB) and f3.pdf (8MB) and the limit is 50MB per zip file I want the output to be two zip files, one with f1.pdf and f2.pdf and one with f3.pdf.

    – Barak Ohana
    Jan 4 at 13:45











  • @BarakOhana zipsplit will create a number of stand-alone zipfiles each of which can be unzipped on its own (no joining needed). zip -s on the other hand creates a number of files that must be joined via zip --fix because unzip cannot currently handle these files. I'd go with zipsplit in your case.

    – PerlDuck
    Jan 4 at 14:37














0












0








0







You need zipsplit which is part of the zip package:



zipsplit -n $(( 250 * 1024 * 1024 )) your_zipfile.zip


It splits an existing zipfile into smaller chunks. The size of each
chunk can be supplied via the -n switch. It defaults to
360000 because years ago floppy disks had a capacity of 360 kB.



Another option would be to create the chunks in the first place while
zipping (see zip, especially the -s switch) and thus avoiding
the separate zipsplit step:



zip -s 250m new-zipfile file1 file2 file3...


Unfortunately unzip new-zipfile.zip cannot handle the chunks created
via zip -s so you have to join them on the target side before unzipping:



zip --fix new-zipfile --out joined-zipfile
unzip joined-zipfile





share|improve this answer















You need zipsplit which is part of the zip package:



zipsplit -n $(( 250 * 1024 * 1024 )) your_zipfile.zip


It splits an existing zipfile into smaller chunks. The size of each
chunk can be supplied via the -n switch. It defaults to
360000 because years ago floppy disks had a capacity of 360 kB.



Another option would be to create the chunks in the first place while
zipping (see zip, especially the -s switch) and thus avoiding
the separate zipsplit step:



zip -s 250m new-zipfile file1 file2 file3...


Unfortunately unzip new-zipfile.zip cannot handle the chunks created
via zip -s so you have to join them on the target side before unzipping:



zip --fix new-zipfile --out joined-zipfile
unzip joined-zipfile






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 4 at 12:43

























answered Jan 4 at 12:12









PerlDuckPerlDuck

5,85211333




5,85211333













  • the files created will be real zip file of chunks (means that later on I will need to put them together) of the original one? If my original file contains f1.pdf (25MB) ,f2.pdf (20MB) and f3.pdf (8MB) and the limit is 50MB per zip file I want the output to be two zip files, one with f1.pdf and f2.pdf and one with f3.pdf.

    – Barak Ohana
    Jan 4 at 13:45











  • @BarakOhana zipsplit will create a number of stand-alone zipfiles each of which can be unzipped on its own (no joining needed). zip -s on the other hand creates a number of files that must be joined via zip --fix because unzip cannot currently handle these files. I'd go with zipsplit in your case.

    – PerlDuck
    Jan 4 at 14:37



















  • the files created will be real zip file of chunks (means that later on I will need to put them together) of the original one? If my original file contains f1.pdf (25MB) ,f2.pdf (20MB) and f3.pdf (8MB) and the limit is 50MB per zip file I want the output to be two zip files, one with f1.pdf and f2.pdf and one with f3.pdf.

    – Barak Ohana
    Jan 4 at 13:45











  • @BarakOhana zipsplit will create a number of stand-alone zipfiles each of which can be unzipped on its own (no joining needed). zip -s on the other hand creates a number of files that must be joined via zip --fix because unzip cannot currently handle these files. I'd go with zipsplit in your case.

    – PerlDuck
    Jan 4 at 14:37

















the files created will be real zip file of chunks (means that later on I will need to put them together) of the original one? If my original file contains f1.pdf (25MB) ,f2.pdf (20MB) and f3.pdf (8MB) and the limit is 50MB per zip file I want the output to be two zip files, one with f1.pdf and f2.pdf and one with f3.pdf.

– Barak Ohana
Jan 4 at 13:45





the files created will be real zip file of chunks (means that later on I will need to put them together) of the original one? If my original file contains f1.pdf (25MB) ,f2.pdf (20MB) and f3.pdf (8MB) and the limit is 50MB per zip file I want the output to be two zip files, one with f1.pdf and f2.pdf and one with f3.pdf.

– Barak Ohana
Jan 4 at 13:45













@BarakOhana zipsplit will create a number of stand-alone zipfiles each of which can be unzipped on its own (no joining needed). zip -s on the other hand creates a number of files that must be joined via zip --fix because unzip cannot currently handle these files. I'd go with zipsplit in your case.

– PerlDuck
Jan 4 at 14:37





@BarakOhana zipsplit will create a number of stand-alone zipfiles each of which can be unzipped on its own (no joining needed). zip -s on the other hand creates a number of files that must be joined via zip --fix because unzip cannot currently handle these files. I'd go with zipsplit in your case.

– PerlDuck
Jan 4 at 14:37


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106903%2fsplit-zip-into-smaller-zip-files%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Ellipse (mathématiques)

Quarter-circle Tiles

Mont Emei