--Do not create or receive ZIP files larger than 4GB. --Get it with tar or 7z. --If you get it, check the OS of the other party. --If you are using Linux or mac, you can decompress it with 7z. --Unar is used because encoding problems occur on Windows. (All may be unar)
I received a large amount of locally stored files from a customer. Since the original capacity is several hundred GB and it is physically difficult for me due to the influence of corona, I asked the customer to divide it at a good place and upload it to the file server, but those files It was the first time that was a ZIP of 2 to 10GB per file. I couldn't handle hundreds of GB on my local PC, so I tried to unzip it on ubuntu server, but I got into various problems.
Due to the influence of the library on the back of unzip, if it exceeds 4GB, the following error will occur and it cannot be decompressed. I'm surprised.
Archive: xyz.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
If this is the only problem, you can fix it by installing 7z.
sudo apt install p7zip-full
In 7z, you can decompress with either e or x, but e ignores the folder structure and decompresses, so normally decompress with x.
7z x -o destdir xyz.zip
Most Japanese users of Windows use SHIFT-JIS standard. Since ZIP does not convert the character code, the SJIS file name is saved as SJIS as it is. Recent Linux and Mac are UTF8, so the characters will be garbled when decompressing. When I googled, various solutions (such as changing the LANG setting or using convnv) came out, but none of them worked.
As a result of various googles, it was solved in one shot by decompressing with unar. Installation is possible below
sudo apt install unar
Decompression is simple
unar xyz.zip
You can do it with. If the folder exists, you will be asked if you want to overwrite it, so if it is troublesome, use -f
.
I think there are various things, but it seems that you will be happier if you do not use ZIP.
Recommended Posts