Unpacking .z01 .z02 .z03 without .zip on LINUX
Solution 1
Are you sure these are all the archive files? Maybe you're missing a .zip
or .z00
file somewhere. Or try running file
on the files (using file *
in their directory works), they may not be zip files at all.
Could also try using cat
to "paste" together all the files in the right order, and write to a file (if they're small) or pipe that straight into zip
/unzip
:
cat .z01 .z02 .z03 ... | unzip
Should be able to use wildcards for the filenames too, like cat name.z*
, and testing the list/order with echo name.z*
could help too/first.
But man unzip
says it should be able to handle wildcards itself, so just this might work too:
unzip name.z*
Possibly requiring escaping (name.z\*
) or quoting the asterisk unzip "name.z*"
See man unzip
.
If the above don't work, then from the man unzip
bug (listed below), you may have to cat
all the files into a single file, and then run zip -F
or zip -FF
, as in:
zip -F foo --out foofix
or zip -FF foo --out foofixfix
And then unzipping foofix
or foofixfix
Info from man unzip
:
BUGS
Multi-part archives are not yet supported, except in conjunction with zip. (All parts must be concatenated together in order, and then ``zip -F'' (for zip 2.x) or ''zip -FF'' (for zip 3.x) must be performed on the concatenated archive in order to ''fix'' it. Also, zip 3.0 and later can combine multi-part (split) archives into a combined single- file archive using ''zip -s- inarchive -O outarchive''. See the zip 3 manual page for more information.) This will definitely be corrected in the next major release.
And this info from man zip
may be useful:
Split archives. zip version 3.0 and later can create split archives. A split archive is a standard zip archive split over multiple files. (Note that split archives are not just archives split in to pieces, as the offsets of entries are now based on the start of each split. Concatenating the pieces together will invalidate these offsets, but unzip can usually deal with it. zip will usually refuse to process such a spliced archive unless the -FF fix option is used to fix the offsets.)
...
In addition, streamed archives, entries encrypted with standard encryption, or split archives created with the pause option may not be compatible with PKZIP as data descriptors are used and PKZIP at the time of this writing does not support data descriptors (but recent changes in the PKWare published zip standard now include some support for the data descriptor format zip uses).
Solution 2
Solved it. Stupid file is a RAR archive. unrar e filename.z01
worked a treat. Problem solved
Related videos on Youtube
Darryl
Updated on September 18, 2022Comments
-
Darryl over 1 year
I have received several archives and they all have extensions of .z01 .z02 .z03 etc.
There is no .zip file and no .z00 file.
If I transfer these files to my Mac and run them through un-stuffit, it unpacks fine.
But I cannot work out who to do this on my NAS (Linux) via the terminal window (I actually want to automate the process, so it needs to happen on the linux box)I have tried zip -FF file.z01 --out newfile.zip and then unzip newel.zip but that fails.
I have tried 7z and all other suggested options (that relate to having a .zip file) fail.Can someone point me in the right direction. Do I need a particular version of zip or 7z ??
-
Darryl about 9 yearsHave tried using cat to create a .zip file - as you mention - Doesn't work. Have tried zip, unzip, 7z no success. Only way I can unpack is to transfer the files to my Mac and use UnStuffit.
-
Xen2050 about 9 yearsUpdated with
-F
&-FF
options, wasn't quite done writing the answer yet -
Darryl about 9 yearsYes, I have tried the -F and -FF options. It doesn't seem to do anything productive in my case. I'll see if Unstuffy can shed some light on the type of archive.
-
Xen2050 about 9 yearsOn most linux (linuxii?) the
file
command often tells something useful, withfile *
for every file in a dir. And trying the guifile-roller
archive manager (or another one) might work a little better too