I have a file, images.tar.gz. , which contains about 7000 .png images. I need to unzip this file.
But when I use terminal to unzip it
tar zxvf /Users/JourneyWoo/images_002.tar.gz
I always encounter this problem
... ...
x images/00003910_000.png
x images/00001934_002.png
x images/00002250_001.png: gzip decompression failed
tar: Error exit delayed from previous errors.
In this way, I cannot get the whole dataset in this .tar.gz file due to the break.
I also used chmod u+r /Users/JourneyWoo/images_002.tar.gz
, but it did not work.
Maybe the problem about one of the png images in this .tar.gz file? How can I deal with this problem? REALLY THANKS!
Simply right-click the item you want to compress, mouseover compress, and choose tar. gz. You can also right-click a tar. gz file, mouseover extract, and select an option to unpack the archive.
gz file extension) is a compressed file format used to archive data to take up smaller space. Gzip uses the same compression algorithm as the more commonly known zip but can only be used on a single file. In short, Gzip compresses all the individual files and tar packages them in a single archive. So, a tar.
The problem lies in the fact that Mac OS uses bsdtar. When I have a similar problem, I installed gnutar (most Linux systems use ).
brew install gnu-tar
gtar -ztvf archive.tar.gz
The file is corrupted. You need to try to get a good copy from wherever it came from, or if it was corrupted when created, you need to get it regenerated from the images. The problem has nothing to do with the .png files. The problem is that the .tar.gz is corrupted.
(By the way "unzip" is the wrong verb here, since it is not a zip file. "extract" would be the correct verb.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With