I have a 7 GB directory on my server and I want to download it to my PC. I've archived it with this command:
zip -9 -r sc.zip FOLDER/
I downloaded it to my PC . But ZIP file larger than 4 GB gives File too large error because I'm using FAT32. So I've downloaded 4294966367 bytes (about 4G) of the zip file and download stopped. Is it possible to rearchive the folder with 2 parts but first part will be exactly 4294966367 bytes and second part must be start from 4294966368th byte. After this, I hope I'll just need to download 2nd part and use previous downloaded 4 GB file as first part.
Shortly, I've already downloaded 4 GB of a zip, now I don't want to redownload it from zero. Is it possible to rearchive directory starting from 4th GB?
1st update: I know I can use -s parameter but it's getting minimum kilobytes, not bytes.
2nd update:
I've split large .zip
file with this command:
split -b 4294966367 -d sc.zip sc-part
Now there are sc-part00 and sc-part01. I've downloaded these 2 files and I joined them into one .zip
file with this command:
cat sc-part* > file.zip
However, there's an error when I try to unzip it:
You have: 7GB full file split to 2 parts, 1st 4GB and 2nd 3GB. So it seems to me that
unzip
couldn't find the zip magic byte till it reach3201769769
. If you check precisely3201769768
is the size of the 2nd part.Basically, you swapped the order of the parts when joined with
cat
. To check:cat sc-part01 sc-part00 > file.zip
md5sum sc-part*
for the ones in server and the ones in local machine.BTW, there is many ways to spit file in a defined byte. Example:
tail -c <remaining-size> <source-file> > <destination-file>
dd if=<source-file> iflag=skip_bytes skip=<number-of-bytes-to-skip> of=<destination-file>
Easy answer: split the directory into two equalish sized directories and zip each of them. Then unzip them and recombine them on your PC.
I see you're on a Mac. try this:
That should do the whole thing over SSH, assuming that you have that set up.