Looking at this question, I was curious whether a
zip command could be used in a file-manager context menu to create multiple 20MB zip files (the level accepted by a gmail message). The answers to that question show that
7z multi-files can be easily created, but I wondered if
zip files can be as accessible.
A command like the one presented here should work. Both in a terminal and in Thunar custom actions I have seen the same result with this command:
zip my_archive.zip -r /path/to -s 20m
the version for Thunar is
zip my_archive.zip -r %f -s 20m
But the resulting archive (my_archive.z01, my_archive.z02, my_archive.z03..., my_archive.zip) cannot be opened.
Maybe that is expected, as I see here that those resulting files have to be "unsplit" before being "unzipped", with the command
zip -s 0 my_archive.zip --out unsplit.zip
(I have to say I didn't expected the need for that, as usually other multi-file archives do not need to be re-joined before being extracted, and even an archive split with
hjsplit gives multiple archive-volumes that can be directly extracted. But that's another matter.)
Only that the
unsplit.zip file also gives an error upon extraction.
$ unzip unsplit.zip Archive: unsplit.zip inflating: home/cip/Desktop/R/Interviu/20170918.3gpp error: invalid compressed data to inflate
The archive cannot be extracted, but it can be opened (explored inside an archive manager) and it has an odd folder-inside-folder structure (reflecting the path where it was created initially; as in the
inflating line above).
What is wrong?