Fix Corrupted Zip Archive
How to fix corrupted zip file using CLI tool
When you download a zip file from the internet, there is a chance that you get a corrupted file. This is not the network fault. The uploader probably doesn’t verify the archive correctly.
Here is an example output when I try to unzip a corrupted zip I get from the internet.
Worry not, the zip command can be used to fix the archive. It’ll try to recover the files as much as possible and put them into a new zip file. The syntax looks like the following snippet.
Here is an example output when I try to fix my corrupted zip file.
After the previous process finished, you can just unzip the newly created zip archive.
That’s it. Now you can get the content from that corrupted zip file.
Hope this simple trick useful for you! Thank you for reading.