The question asks about unzipping a file which is larger than 4Gb, that was created using Winrar.
According to some people, unzip
(Info-ZIP) is not able to handle that large a file due to limitations in the zip-format, and that a multi-volume zip archive would be needed, while others mention a zip64 extension which may/may not be provided in a given copy of unzip:
Now... Info-ZIP has had support for "large files" since the release of 6.0 in April 2009, based on a description in PKWARE, e.g., quoting from Info-ZIP's proginfo/ziplimit.txt
file:
A2) Hard limits of the Zip archive format with Zip64 extensions:
In 2001, PKWARE has published version 4.5 of the Zip format specification
(together with the release of PKZIP for Windows 4.5). This specification
defines new extra field blocks that allow to break the size limits of the
standard zipfile structures. This extended "Zip64" format enlarges the
theoretical limits to the following values:
Number of entries in Zip archive: 16 Ei (2^64 - 1 entries)
Compressed size of archive entry: 16 EiByte (2^64 - 1 Bytes)
Uncompressed size of entry: 16 EiByte (2^64 - 1 Bytes)
Size of single-volume Zip archive: 16 EiByte (2^64 - 1 Bytes)
Per-volume size of multi-volume archives: 16 EiByte (2^64 - 1 Bytes)
Number of parts for multi-volume archives: 4 Gi (2^32 - 1 parts)
Total size of multi-volume archive: 2^96 Byte (16 Ei * 4Gi)
The Info-ZIP software releases (beginning with Zip 3.0 and UnZip 6.0)
support Zip64 archives on selected environments (where the underlying
operating system capabilities are sufficient, e.g. Unix, VMS and Win32).
and one can see if it is supported:
$ unzip -v
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 8.3.0 for Unix (Linux ELF).
UnZip special compilation options:
ACORN_FTYPE_NFS
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
SYMLINKS (symbolic links supported, if RTL and file system permit)
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars, char coding: UTF-8] (handle UTF-8 paths)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.6, 6-Sept-2010)
VMS_TEXT_CONV
WILD_STOP_AT_DIR
[decryption, version 2.11 of 05 Jan 2007]
UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]
Now... WinRAR has had support for extracting from zip64 files for some time (version 3.50 in 2005), mentioned in its release notes. But none of the subsequent releases mention zip64, and several people comment that it cannot create zip64 files. If that is correct, OP may actually have an RAR file, which would not be read correctly by unzip
.
When unzip
attempts to open a file which is not actually a zip-file, it gives a message, e.g.,
$ unzip -l foo.zip
Archive: foo.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.
unzip: cannot find zipfile directory in one of foo.zip or
foo.zip.zip, and cannot find foo.zip.ZIP, period.
In a quick check, if it tries to open an RAR file, the message is the same.
But the file
program can tell what it is:
file foo.zip
foo.zip: RAR archive data, v5
The 7-zip program can extract an RAR file. But unzip cannot.
$ 7z l foo.zip
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Intel(R) Core(TM) i7-4578U CPU @ 3.00GHz (40651),ASM,AES-NI)
Scanning the drive for archives:
1 file, 36015 bytes (36 KiB)
Listing archive: foo.zip
--
Path = foo.zip
Open WARNING: Can not open the file as [zip] archive
Type = Rar5
Physical Size = 36015
Solid = -
Blocks = 5
Encrypted = -
Multivolume = -
Volumes = 1
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2009-04-19 17:38:10 ..... 4938 1996 funzip.1
2009-04-19 19:33:10 ..... 49657 17764 unzip.1
2009-04-19 17:38:48 ..... 14661 5499 unzipsfx.1
2009-04-19 17:38:52 ..... 3811 1557 zipgrep.1
2009-04-19 17:39:00 ..... 23607 8822 zipinfo.1
------------------- ----- ------------ ------------ ------------------------
2009-04-19 19:33:10 96674 35638 5 files
Warnings: 1
ls -l filename.zip