I tried a majority of the formats (gzip, etc.) to extract a zip file with tar, and when I became frustrated enough to Google for it, I found no way to extract a zip file with tar and only recommendations to use zip or unzip. As a matter of fact, my Linux system doesn't even have a zip utility, but only unzip (leaving me to wonder why this is the main recommended option). Of course unzip worked, solving my problem, but why can't tar extract zip files? Perhaps I should instead be asking, what is the difference between zip and the compression methods supported by tar?
|
|
||||
closed as primarily opinion-based by derobert, Braiam, slm♦ Jul 23 '14 at 21:34Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question. |
||||
|
The UNIX philosophy is to have small tools. One tool is doing exactly one thing, but this especially well. The The If you want to have both, you just combine both tools resulting in a The If you want one tool to rule them all use |
|||||||||
|
|
Long story short: tar GNU tool doesn't pipe through zip/unzip since nobody cares. Long story, original size:
Now, to make such task a painless as possible,
So, it isn't that Now, there are all-in-one tools that compress/uncompress everything you throw at them, again, you need to have the correct tools to actually support it. If you don't have them, the tool will fail. |
|||||||||||||||||||||
|
|
A When you extract a You can also compress files using |
|||
|
|
|
As the answer "Some things just are and we should accept them" does not sit well with me either, I just did some digging (always good to learn something new isn't it?). So it looks like the issue is one of where the tools went and what their aim was. Instead of paraphrasing what I found and making the waters needlessly murky (obfuscation pisses me off), take a look at this article: http://www.differencebetween.net/technology/difference-between-zip-and-gzip/ I suppose that tar could have built in zip support, but the methodologies are apparently fundamentally different. Or perhaps they thought why would someone use this archiving tool to manage files from another archiving and compression tool (or perhaps there was some argument between the two original coders and there was a restraining order filed that disallowed the zips from crossing the application boundary... yes I am kidding). |
|||
|
|
bsdtarcan extract.ziparchives :P – HalosGhost Jul 23 '14 at 20:41