On Linux/Unix, does .tar.gz versus .zip matter?How to split a zip file across INDEPENDENT volumesUnix zip...
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
Performing Transactions cleanup
Why is consensus so controversial in Britain?
Modeling an IP Address
Java Casting: Java 11 throws LambdaConversionException while 1.8 does not
if condition in the past
Can I make popcorn with any corn?
If human space travel is limited by the G force vulnerability, is there a way to counter G forces?
How to format long polynomial?
Approximately how much travel time was saved by the opening of the Suez Canal in 1869?
"You are your self first supporter", a more proper way to say it
Is it unprofessional to ask if a job posting on GlassDoor is real?
Did Shadowfax go to Valinor?
I'm flying to France today and my passport expires in less than 2 months
Do I have a twin with permutated remainders?
Question on branch cuts and branch points
Do infinite dimensional systems make sense?
How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?
Two films in a tank, only one comes out with a development error – why?
Theorems that impeded progress
Which country benefited the most from UN Security Council vetoes?
What's the point of deactivating Num Lock on login screens?
Today is the Center
Maximum likelihood parameters deviate from posterior distributions
On Linux/Unix, does .tar.gz versus .zip matter?
How to split a zip file across INDEPENDENT volumesUnix zip commandUNIX shell command to expand files of any compressed typeHow would Apache or Compressed HTTP react to a zip bomb?Listing files, including archive contentsUnix zip: zip multiple folders in to one zip file without creating a top containing folderCan a ZIP file auto-execute files from inside it?Unzipping Taking A Long Time (about 200-800kbs)unix line endings versus windows line endingsSaving ZIP file attachments and reading them in Git Bash
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
Cross-platform programs are sometimes distributed as .tar.gz for the Unix version and .zip for the Windows version. This makes sense when the contents of each must be different.
If, however, the contents are going to be the same, it would be simpler to just have one download. Windows prefers .zip because that's the format it can handle out of the box. Does it matter on Unix? That is, I tried today unzipping a file on Ubuntu Linux, and it worked fine; is there any problem with this on any current Unix-like operating system, or is it okay to just provide a .zip file across the board?
linux unix zip
add a comment |
Cross-platform programs are sometimes distributed as .tar.gz for the Unix version and .zip for the Windows version. This makes sense when the contents of each must be different.
If, however, the contents are going to be the same, it would be simpler to just have one download. Windows prefers .zip because that's the format it can handle out of the box. Does it matter on Unix? That is, I tried today unzipping a file on Ubuntu Linux, and it worked fine; is there any problem with this on any current Unix-like operating system, or is it okay to just provide a .zip file across the board?
linux unix zip
add a comment |
Cross-platform programs are sometimes distributed as .tar.gz for the Unix version and .zip for the Windows version. This makes sense when the contents of each must be different.
If, however, the contents are going to be the same, it would be simpler to just have one download. Windows prefers .zip because that's the format it can handle out of the box. Does it matter on Unix? That is, I tried today unzipping a file on Ubuntu Linux, and it worked fine; is there any problem with this on any current Unix-like operating system, or is it okay to just provide a .zip file across the board?
linux unix zip
Cross-platform programs are sometimes distributed as .tar.gz for the Unix version and .zip for the Windows version. This makes sense when the contents of each must be different.
If, however, the contents are going to be the same, it would be simpler to just have one download. Windows prefers .zip because that's the format it can handle out of the box. Does it matter on Unix? That is, I tried today unzipping a file on Ubuntu Linux, and it worked fine; is there any problem with this on any current Unix-like operating system, or is it okay to just provide a .zip file across the board?
linux unix zip
linux unix zip
asked May 29 '10 at 18:59
rwallacerwallace
1,00421626
1,00421626
add a comment |
add a comment |
8 Answers
8
active
oldest
votes
Necromancing.
Yes, it matters.
Actually, it depends.
tar.gz
Stores unix file attributes: uid, gid, permissions (most notably executable). The default may depend on your distribution, and can be toggled with options.- Consolidates all files to be archived in one file ("Tape ARchive").
- Actual compression is done by GZIP, on the one .tar file
zip
Stores MSDOS attributes. (Archive, Readonly, Hidden, System)- Compresses each file individually, then consolidates the individually compressed files in one file
- Includes a file table at the end of the file
Because zip compresses the files individually, a zip-archive will most-likely have a larger size (especially with many smaller files - think config files).
So you see, appart from file size, if you zip a bunch of files on Linux/Unix, and then unzip them, the file-attributes will be gone (at the very least those not supported by MS-DOS - depends on what ZIP-software you use). This may matter, or it may not, in which case it doesn't matter (because the file-size difference is in most cases negligible).
8
the standard distro of zip on unix-like systems (info-zip) also stores unix file attributes.
– Erik Aronesty
Apr 24 '18 at 21:26
add a comment |
tar gz is better for Linux/Unix as it retains permissions, such as "executable" on scripts.
7
OS X's Archive Utility and zip / unzip preserve permissions, but there might be other utilities that don't.
– Lri
Jan 19 '13 at 15:33
3
Standard zip/unzip tools (info-zip) retain permissions on linux, and timestamps on windows. see: en.wikipedia.org/wiki/Info-ZIP for typical capabilities... which overcomes the permissions issues and file size limitations while retaining desirable random access and editable archive properties.
– Erik Aronesty
Apr 24 '18 at 21:23
add a comment |
Most popular Linux distros these days are by default equipped with zip compatibility. But as stated by nc3b, tar and gzip are more common on Linux/Unix systems. If you need 95% compatibility on these systems, consider using tar and gzip. If you need only 85%, zip will do fine.
2
Okay, 95% is better than 85% :-) A very minor question, does it matter at all if the file extension is .tgz instead of .tar.gz?
– rwallace
May 29 '10 at 19:34
8
Extension doesn't matter at all, it's just used for reference by users and programs. If the extension is .XXX and you know it's .tar, you could still use tar to untar it. .tgz and .tar.gz are both in fact the same extensions and files with these extensions would be similar.
– BloodPhilia
May 29 '10 at 19:43
2
On the other hand, for 100% compatibility on Windows you would need to use cab.
– kinokijuf
Nov 15 '11 at 17:39
3
tar will store uid, gid and permissions, such as +x on unix systems. zip stores archive, readonly, hidden and system on windows systems.
– Andrew De Andrade
Oct 30 '13 at 21:43
@BloodPhilia, So does that mean that we can GZip a file and rename it as .zip and it will correctly unzip?
– Pacerier
Apr 24 '14 at 11:33
|
show 3 more comments
tar/gzip is a pretty crappy format since the archive cannot be randomly accessed, updated, verified or even appended to... without having to decompress the entire archive.
zip is much better in that regard.... you can quickly obtain the contents of a zip file, append to it without recompressing the first part, etc.
zip has some size limitations ... depending on the version of "zip" that you use... and these can be a problem. but the standard info-zip tool that comes with most linux-like os'es has no size limitations and preserves file permissions just fine.
see: https://en.wikipedia.org/wiki/Info-ZIP for capabilities
What kind of limitations are you talking about?
– Pacerier
Apr 24 '14 at 11:34
edited and provided a link
– Erik Aronesty
Apr 24 '18 at 21:29
add a comment |
Barebones Unix installs don't contain unzip (i.e. server installs), but they always contain tar and gzip. If your audience is servers, I'd go for gzip.
Also gzip has greater compression than zip, so the file will be smaller.
1
I wouldn't say gzip compresses better than ZIP. Both use the same DEFLATE algorithm, and all comparisons I've done give similar results in file size.
– grawity
May 29 '10 at 21:57
4
Well, tar.gz will compress the whole file in one go, whereas zip compresses files individually. For many small files, the first approach will usually generate noticeably smaller files, because redundancies can be used across files. The difference is not huge though.
– sleske
Jun 24 '10 at 16:09
add a comment |
Yes, it matters.
Tar is an archiver. And in tar.gz, we compress that archive.
Zip is both an archiver and compressor.
If you compare compression, from my experience, gzip is much better than zip.
And the other significant difference is mentioned in another answer. If you have a very big file archive, and want to extract a small file, Zip allows you to do that. But with tar.gz, you need to extract entire archive.
Not an archive of gzipped files but a gzip of archived files. That's why you have to extract the whole archive.
– m93a
Feb 15 '15 at 16:24
add a comment |
tar and gzip are a lot more common on *nix-es than unzip. For instance, at the moment on my arch-2009.08 there is no unzip.
6
But there isbsdtar(part oflibarchive), which handles ZIP fine.
– grawity
May 29 '10 at 19:19
Oops :"> Didn't know about that. Thanks! :-)
– nc3b
May 30 '10 at 7:22
add a comment |
The decision basically comes down to these:
GZIP keeps Unix file permissions, as files being allowed to execute.
On the other hand ZIP works out of the box in Windows.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f146754%2fon-linux-unix-does-tar-gz-versus-zip-matter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
Necromancing.
Yes, it matters.
Actually, it depends.
tar.gz
Stores unix file attributes: uid, gid, permissions (most notably executable). The default may depend on your distribution, and can be toggled with options.- Consolidates all files to be archived in one file ("Tape ARchive").
- Actual compression is done by GZIP, on the one .tar file
zip
Stores MSDOS attributes. (Archive, Readonly, Hidden, System)- Compresses each file individually, then consolidates the individually compressed files in one file
- Includes a file table at the end of the file
Because zip compresses the files individually, a zip-archive will most-likely have a larger size (especially with many smaller files - think config files).
So you see, appart from file size, if you zip a bunch of files on Linux/Unix, and then unzip them, the file-attributes will be gone (at the very least those not supported by MS-DOS - depends on what ZIP-software you use). This may matter, or it may not, in which case it doesn't matter (because the file-size difference is in most cases negligible).
8
the standard distro of zip on unix-like systems (info-zip) also stores unix file attributes.
– Erik Aronesty
Apr 24 '18 at 21:26
add a comment |
Necromancing.
Yes, it matters.
Actually, it depends.
tar.gz
Stores unix file attributes: uid, gid, permissions (most notably executable). The default may depend on your distribution, and can be toggled with options.- Consolidates all files to be archived in one file ("Tape ARchive").
- Actual compression is done by GZIP, on the one .tar file
zip
Stores MSDOS attributes. (Archive, Readonly, Hidden, System)- Compresses each file individually, then consolidates the individually compressed files in one file
- Includes a file table at the end of the file
Because zip compresses the files individually, a zip-archive will most-likely have a larger size (especially with many smaller files - think config files).
So you see, appart from file size, if you zip a bunch of files on Linux/Unix, and then unzip them, the file-attributes will be gone (at the very least those not supported by MS-DOS - depends on what ZIP-software you use). This may matter, or it may not, in which case it doesn't matter (because the file-size difference is in most cases negligible).
8
the standard distro of zip on unix-like systems (info-zip) also stores unix file attributes.
– Erik Aronesty
Apr 24 '18 at 21:26
add a comment |
Necromancing.
Yes, it matters.
Actually, it depends.
tar.gz
Stores unix file attributes: uid, gid, permissions (most notably executable). The default may depend on your distribution, and can be toggled with options.- Consolidates all files to be archived in one file ("Tape ARchive").
- Actual compression is done by GZIP, on the one .tar file
zip
Stores MSDOS attributes. (Archive, Readonly, Hidden, System)- Compresses each file individually, then consolidates the individually compressed files in one file
- Includes a file table at the end of the file
Because zip compresses the files individually, a zip-archive will most-likely have a larger size (especially with many smaller files - think config files).
So you see, appart from file size, if you zip a bunch of files on Linux/Unix, and then unzip them, the file-attributes will be gone (at the very least those not supported by MS-DOS - depends on what ZIP-software you use). This may matter, or it may not, in which case it doesn't matter (because the file-size difference is in most cases negligible).
Necromancing.
Yes, it matters.
Actually, it depends.
tar.gz
Stores unix file attributes: uid, gid, permissions (most notably executable). The default may depend on your distribution, and can be toggled with options.- Consolidates all files to be archived in one file ("Tape ARchive").
- Actual compression is done by GZIP, on the one .tar file
zip
Stores MSDOS attributes. (Archive, Readonly, Hidden, System)- Compresses each file individually, then consolidates the individually compressed files in one file
- Includes a file table at the end of the file
Because zip compresses the files individually, a zip-archive will most-likely have a larger size (especially with many smaller files - think config files).
So you see, appart from file size, if you zip a bunch of files on Linux/Unix, and then unzip them, the file-attributes will be gone (at the very least those not supported by MS-DOS - depends on what ZIP-software you use). This may matter, or it may not, in which case it doesn't matter (because the file-size difference is in most cases negligible).
edited Oct 9 '17 at 7:47
answered Oct 9 '17 at 7:40
QuandaryQuandary
98531724
98531724
8
the standard distro of zip on unix-like systems (info-zip) also stores unix file attributes.
– Erik Aronesty
Apr 24 '18 at 21:26
add a comment |
8
the standard distro of zip on unix-like systems (info-zip) also stores unix file attributes.
– Erik Aronesty
Apr 24 '18 at 21:26
8
8
the standard distro of zip on unix-like systems (info-zip) also stores unix file attributes.
– Erik Aronesty
Apr 24 '18 at 21:26
the standard distro of zip on unix-like systems (info-zip) also stores unix file attributes.
– Erik Aronesty
Apr 24 '18 at 21:26
add a comment |
tar gz is better for Linux/Unix as it retains permissions, such as "executable" on scripts.
7
OS X's Archive Utility and zip / unzip preserve permissions, but there might be other utilities that don't.
– Lri
Jan 19 '13 at 15:33
3
Standard zip/unzip tools (info-zip) retain permissions on linux, and timestamps on windows. see: en.wikipedia.org/wiki/Info-ZIP for typical capabilities... which overcomes the permissions issues and file size limitations while retaining desirable random access and editable archive properties.
– Erik Aronesty
Apr 24 '18 at 21:23
add a comment |
tar gz is better for Linux/Unix as it retains permissions, such as "executable" on scripts.
7
OS X's Archive Utility and zip / unzip preserve permissions, but there might be other utilities that don't.
– Lri
Jan 19 '13 at 15:33
3
Standard zip/unzip tools (info-zip) retain permissions on linux, and timestamps on windows. see: en.wikipedia.org/wiki/Info-ZIP for typical capabilities... which overcomes the permissions issues and file size limitations while retaining desirable random access and editable archive properties.
– Erik Aronesty
Apr 24 '18 at 21:23
add a comment |
tar gz is better for Linux/Unix as it retains permissions, such as "executable" on scripts.
tar gz is better for Linux/Unix as it retains permissions, such as "executable" on scripts.
answered Nov 22 '12 at 11:35
ZamZam
359132
359132
7
OS X's Archive Utility and zip / unzip preserve permissions, but there might be other utilities that don't.
– Lri
Jan 19 '13 at 15:33
3
Standard zip/unzip tools (info-zip) retain permissions on linux, and timestamps on windows. see: en.wikipedia.org/wiki/Info-ZIP for typical capabilities... which overcomes the permissions issues and file size limitations while retaining desirable random access and editable archive properties.
– Erik Aronesty
Apr 24 '18 at 21:23
add a comment |
7
OS X's Archive Utility and zip / unzip preserve permissions, but there might be other utilities that don't.
– Lri
Jan 19 '13 at 15:33
3
Standard zip/unzip tools (info-zip) retain permissions on linux, and timestamps on windows. see: en.wikipedia.org/wiki/Info-ZIP for typical capabilities... which overcomes the permissions issues and file size limitations while retaining desirable random access and editable archive properties.
– Erik Aronesty
Apr 24 '18 at 21:23
7
7
OS X's Archive Utility and zip / unzip preserve permissions, but there might be other utilities that don't.
– Lri
Jan 19 '13 at 15:33
OS X's Archive Utility and zip / unzip preserve permissions, but there might be other utilities that don't.
– Lri
Jan 19 '13 at 15:33
3
3
Standard zip/unzip tools (info-zip) retain permissions on linux, and timestamps on windows. see: en.wikipedia.org/wiki/Info-ZIP for typical capabilities... which overcomes the permissions issues and file size limitations while retaining desirable random access and editable archive properties.
– Erik Aronesty
Apr 24 '18 at 21:23
Standard zip/unzip tools (info-zip) retain permissions on linux, and timestamps on windows. see: en.wikipedia.org/wiki/Info-ZIP for typical capabilities... which overcomes the permissions issues and file size limitations while retaining desirable random access and editable archive properties.
– Erik Aronesty
Apr 24 '18 at 21:23
add a comment |
Most popular Linux distros these days are by default equipped with zip compatibility. But as stated by nc3b, tar and gzip are more common on Linux/Unix systems. If you need 95% compatibility on these systems, consider using tar and gzip. If you need only 85%, zip will do fine.
2
Okay, 95% is better than 85% :-) A very minor question, does it matter at all if the file extension is .tgz instead of .tar.gz?
– rwallace
May 29 '10 at 19:34
8
Extension doesn't matter at all, it's just used for reference by users and programs. If the extension is .XXX and you know it's .tar, you could still use tar to untar it. .tgz and .tar.gz are both in fact the same extensions and files with these extensions would be similar.
– BloodPhilia
May 29 '10 at 19:43
2
On the other hand, for 100% compatibility on Windows you would need to use cab.
– kinokijuf
Nov 15 '11 at 17:39
3
tar will store uid, gid and permissions, such as +x on unix systems. zip stores archive, readonly, hidden and system on windows systems.
– Andrew De Andrade
Oct 30 '13 at 21:43
@BloodPhilia, So does that mean that we can GZip a file and rename it as .zip and it will correctly unzip?
– Pacerier
Apr 24 '14 at 11:33
|
show 3 more comments
Most popular Linux distros these days are by default equipped with zip compatibility. But as stated by nc3b, tar and gzip are more common on Linux/Unix systems. If you need 95% compatibility on these systems, consider using tar and gzip. If you need only 85%, zip will do fine.
2
Okay, 95% is better than 85% :-) A very minor question, does it matter at all if the file extension is .tgz instead of .tar.gz?
– rwallace
May 29 '10 at 19:34
8
Extension doesn't matter at all, it's just used for reference by users and programs. If the extension is .XXX and you know it's .tar, you could still use tar to untar it. .tgz and .tar.gz are both in fact the same extensions and files with these extensions would be similar.
– BloodPhilia
May 29 '10 at 19:43
2
On the other hand, for 100% compatibility on Windows you would need to use cab.
– kinokijuf
Nov 15 '11 at 17:39
3
tar will store uid, gid and permissions, such as +x on unix systems. zip stores archive, readonly, hidden and system on windows systems.
– Andrew De Andrade
Oct 30 '13 at 21:43
@BloodPhilia, So does that mean that we can GZip a file and rename it as .zip and it will correctly unzip?
– Pacerier
Apr 24 '14 at 11:33
|
show 3 more comments
Most popular Linux distros these days are by default equipped with zip compatibility. But as stated by nc3b, tar and gzip are more common on Linux/Unix systems. If you need 95% compatibility on these systems, consider using tar and gzip. If you need only 85%, zip will do fine.
Most popular Linux distros these days are by default equipped with zip compatibility. But as stated by nc3b, tar and gzip are more common on Linux/Unix systems. If you need 95% compatibility on these systems, consider using tar and gzip. If you need only 85%, zip will do fine.
edited Aug 9 '16 at 16:01
Community♦
1
1
answered May 29 '10 at 19:07
BloodPhiliaBloodPhilia
24.6k1474105
24.6k1474105
2
Okay, 95% is better than 85% :-) A very minor question, does it matter at all if the file extension is .tgz instead of .tar.gz?
– rwallace
May 29 '10 at 19:34
8
Extension doesn't matter at all, it's just used for reference by users and programs. If the extension is .XXX and you know it's .tar, you could still use tar to untar it. .tgz and .tar.gz are both in fact the same extensions and files with these extensions would be similar.
– BloodPhilia
May 29 '10 at 19:43
2
On the other hand, for 100% compatibility on Windows you would need to use cab.
– kinokijuf
Nov 15 '11 at 17:39
3
tar will store uid, gid and permissions, such as +x on unix systems. zip stores archive, readonly, hidden and system on windows systems.
– Andrew De Andrade
Oct 30 '13 at 21:43
@BloodPhilia, So does that mean that we can GZip a file and rename it as .zip and it will correctly unzip?
– Pacerier
Apr 24 '14 at 11:33
|
show 3 more comments
2
Okay, 95% is better than 85% :-) A very minor question, does it matter at all if the file extension is .tgz instead of .tar.gz?
– rwallace
May 29 '10 at 19:34
8
Extension doesn't matter at all, it's just used for reference by users and programs. If the extension is .XXX and you know it's .tar, you could still use tar to untar it. .tgz and .tar.gz are both in fact the same extensions and files with these extensions would be similar.
– BloodPhilia
May 29 '10 at 19:43
2
On the other hand, for 100% compatibility on Windows you would need to use cab.
– kinokijuf
Nov 15 '11 at 17:39
3
tar will store uid, gid and permissions, such as +x on unix systems. zip stores archive, readonly, hidden and system on windows systems.
– Andrew De Andrade
Oct 30 '13 at 21:43
@BloodPhilia, So does that mean that we can GZip a file and rename it as .zip and it will correctly unzip?
– Pacerier
Apr 24 '14 at 11:33
2
2
Okay, 95% is better than 85% :-) A very minor question, does it matter at all if the file extension is .tgz instead of .tar.gz?
– rwallace
May 29 '10 at 19:34
Okay, 95% is better than 85% :-) A very minor question, does it matter at all if the file extension is .tgz instead of .tar.gz?
– rwallace
May 29 '10 at 19:34
8
8
Extension doesn't matter at all, it's just used for reference by users and programs. If the extension is .XXX and you know it's .tar, you could still use tar to untar it. .tgz and .tar.gz are both in fact the same extensions and files with these extensions would be similar.
– BloodPhilia
May 29 '10 at 19:43
Extension doesn't matter at all, it's just used for reference by users and programs. If the extension is .XXX and you know it's .tar, you could still use tar to untar it. .tgz and .tar.gz are both in fact the same extensions and files with these extensions would be similar.
– BloodPhilia
May 29 '10 at 19:43
2
2
On the other hand, for 100% compatibility on Windows you would need to use cab.
– kinokijuf
Nov 15 '11 at 17:39
On the other hand, for 100% compatibility on Windows you would need to use cab.
– kinokijuf
Nov 15 '11 at 17:39
3
3
tar will store uid, gid and permissions, such as +x on unix systems. zip stores archive, readonly, hidden and system on windows systems.
– Andrew De Andrade
Oct 30 '13 at 21:43
tar will store uid, gid and permissions, such as +x on unix systems. zip stores archive, readonly, hidden and system on windows systems.
– Andrew De Andrade
Oct 30 '13 at 21:43
@BloodPhilia, So does that mean that we can GZip a file and rename it as .zip and it will correctly unzip?
– Pacerier
Apr 24 '14 at 11:33
@BloodPhilia, So does that mean that we can GZip a file and rename it as .zip and it will correctly unzip?
– Pacerier
Apr 24 '14 at 11:33
|
show 3 more comments
tar/gzip is a pretty crappy format since the archive cannot be randomly accessed, updated, verified or even appended to... without having to decompress the entire archive.
zip is much better in that regard.... you can quickly obtain the contents of a zip file, append to it without recompressing the first part, etc.
zip has some size limitations ... depending on the version of "zip" that you use... and these can be a problem. but the standard info-zip tool that comes with most linux-like os'es has no size limitations and preserves file permissions just fine.
see: https://en.wikipedia.org/wiki/Info-ZIP for capabilities
What kind of limitations are you talking about?
– Pacerier
Apr 24 '14 at 11:34
edited and provided a link
– Erik Aronesty
Apr 24 '18 at 21:29
add a comment |
tar/gzip is a pretty crappy format since the archive cannot be randomly accessed, updated, verified or even appended to... without having to decompress the entire archive.
zip is much better in that regard.... you can quickly obtain the contents of a zip file, append to it without recompressing the first part, etc.
zip has some size limitations ... depending on the version of "zip" that you use... and these can be a problem. but the standard info-zip tool that comes with most linux-like os'es has no size limitations and preserves file permissions just fine.
see: https://en.wikipedia.org/wiki/Info-ZIP for capabilities
What kind of limitations are you talking about?
– Pacerier
Apr 24 '14 at 11:34
edited and provided a link
– Erik Aronesty
Apr 24 '18 at 21:29
add a comment |
tar/gzip is a pretty crappy format since the archive cannot be randomly accessed, updated, verified or even appended to... without having to decompress the entire archive.
zip is much better in that regard.... you can quickly obtain the contents of a zip file, append to it without recompressing the first part, etc.
zip has some size limitations ... depending on the version of "zip" that you use... and these can be a problem. but the standard info-zip tool that comes with most linux-like os'es has no size limitations and preserves file permissions just fine.
see: https://en.wikipedia.org/wiki/Info-ZIP for capabilities
tar/gzip is a pretty crappy format since the archive cannot be randomly accessed, updated, verified or even appended to... without having to decompress the entire archive.
zip is much better in that regard.... you can quickly obtain the contents of a zip file, append to it without recompressing the first part, etc.
zip has some size limitations ... depending on the version of "zip" that you use... and these can be a problem. but the standard info-zip tool that comes with most linux-like os'es has no size limitations and preserves file permissions just fine.
see: https://en.wikipedia.org/wiki/Info-ZIP for capabilities
edited Apr 24 '18 at 21:28
answered Nov 15 '11 at 17:28
Erik AronestyErik Aronesty
35426
35426
What kind of limitations are you talking about?
– Pacerier
Apr 24 '14 at 11:34
edited and provided a link
– Erik Aronesty
Apr 24 '18 at 21:29
add a comment |
What kind of limitations are you talking about?
– Pacerier
Apr 24 '14 at 11:34
edited and provided a link
– Erik Aronesty
Apr 24 '18 at 21:29
What kind of limitations are you talking about?
– Pacerier
Apr 24 '14 at 11:34
What kind of limitations are you talking about?
– Pacerier
Apr 24 '14 at 11:34
edited and provided a link
– Erik Aronesty
Apr 24 '18 at 21:29
edited and provided a link
– Erik Aronesty
Apr 24 '18 at 21:29
add a comment |
Barebones Unix installs don't contain unzip (i.e. server installs), but they always contain tar and gzip. If your audience is servers, I'd go for gzip.
Also gzip has greater compression than zip, so the file will be smaller.
1
I wouldn't say gzip compresses better than ZIP. Both use the same DEFLATE algorithm, and all comparisons I've done give similar results in file size.
– grawity
May 29 '10 at 21:57
4
Well, tar.gz will compress the whole file in one go, whereas zip compresses files individually. For many small files, the first approach will usually generate noticeably smaller files, because redundancies can be used across files. The difference is not huge though.
– sleske
Jun 24 '10 at 16:09
add a comment |
Barebones Unix installs don't contain unzip (i.e. server installs), but they always contain tar and gzip. If your audience is servers, I'd go for gzip.
Also gzip has greater compression than zip, so the file will be smaller.
1
I wouldn't say gzip compresses better than ZIP. Both use the same DEFLATE algorithm, and all comparisons I've done give similar results in file size.
– grawity
May 29 '10 at 21:57
4
Well, tar.gz will compress the whole file in one go, whereas zip compresses files individually. For many small files, the first approach will usually generate noticeably smaller files, because redundancies can be used across files. The difference is not huge though.
– sleske
Jun 24 '10 at 16:09
add a comment |
Barebones Unix installs don't contain unzip (i.e. server installs), but they always contain tar and gzip. If your audience is servers, I'd go for gzip.
Also gzip has greater compression than zip, so the file will be smaller.
Barebones Unix installs don't contain unzip (i.e. server installs), but they always contain tar and gzip. If your audience is servers, I'd go for gzip.
Also gzip has greater compression than zip, so the file will be smaller.
edited Mar 7 '13 at 20:32
Hennes
59.4k793144
59.4k793144
answered May 29 '10 at 19:15
RwkyRwky
4492517
4492517
1
I wouldn't say gzip compresses better than ZIP. Both use the same DEFLATE algorithm, and all comparisons I've done give similar results in file size.
– grawity
May 29 '10 at 21:57
4
Well, tar.gz will compress the whole file in one go, whereas zip compresses files individually. For many small files, the first approach will usually generate noticeably smaller files, because redundancies can be used across files. The difference is not huge though.
– sleske
Jun 24 '10 at 16:09
add a comment |
1
I wouldn't say gzip compresses better than ZIP. Both use the same DEFLATE algorithm, and all comparisons I've done give similar results in file size.
– grawity
May 29 '10 at 21:57
4
Well, tar.gz will compress the whole file in one go, whereas zip compresses files individually. For many small files, the first approach will usually generate noticeably smaller files, because redundancies can be used across files. The difference is not huge though.
– sleske
Jun 24 '10 at 16:09
1
1
I wouldn't say gzip compresses better than ZIP. Both use the same DEFLATE algorithm, and all comparisons I've done give similar results in file size.
– grawity
May 29 '10 at 21:57
I wouldn't say gzip compresses better than ZIP. Both use the same DEFLATE algorithm, and all comparisons I've done give similar results in file size.
– grawity
May 29 '10 at 21:57
4
4
Well, tar.gz will compress the whole file in one go, whereas zip compresses files individually. For many small files, the first approach will usually generate noticeably smaller files, because redundancies can be used across files. The difference is not huge though.
– sleske
Jun 24 '10 at 16:09
Well, tar.gz will compress the whole file in one go, whereas zip compresses files individually. For many small files, the first approach will usually generate noticeably smaller files, because redundancies can be used across files. The difference is not huge though.
– sleske
Jun 24 '10 at 16:09
add a comment |
Yes, it matters.
Tar is an archiver. And in tar.gz, we compress that archive.
Zip is both an archiver and compressor.
If you compare compression, from my experience, gzip is much better than zip.
And the other significant difference is mentioned in another answer. If you have a very big file archive, and want to extract a small file, Zip allows you to do that. But with tar.gz, you need to extract entire archive.
Not an archive of gzipped files but a gzip of archived files. That's why you have to extract the whole archive.
– m93a
Feb 15 '15 at 16:24
add a comment |
Yes, it matters.
Tar is an archiver. And in tar.gz, we compress that archive.
Zip is both an archiver and compressor.
If you compare compression, from my experience, gzip is much better than zip.
And the other significant difference is mentioned in another answer. If you have a very big file archive, and want to extract a small file, Zip allows you to do that. But with tar.gz, you need to extract entire archive.
Not an archive of gzipped files but a gzip of archived files. That's why you have to extract the whole archive.
– m93a
Feb 15 '15 at 16:24
add a comment |
Yes, it matters.
Tar is an archiver. And in tar.gz, we compress that archive.
Zip is both an archiver and compressor.
If you compare compression, from my experience, gzip is much better than zip.
And the other significant difference is mentioned in another answer. If you have a very big file archive, and want to extract a small file, Zip allows you to do that. But with tar.gz, you need to extract entire archive.
Yes, it matters.
Tar is an archiver. And in tar.gz, we compress that archive.
Zip is both an archiver and compressor.
If you compare compression, from my experience, gzip is much better than zip.
And the other significant difference is mentioned in another answer. If you have a very big file archive, and want to extract a small file, Zip allows you to do that. But with tar.gz, you need to extract entire archive.
edited Mar 20 '17 at 10:17
Community♦
1
1
answered Jul 31 '14 at 14:38
Rakesh ReddyRakesh Reddy
313
313
Not an archive of gzipped files but a gzip of archived files. That's why you have to extract the whole archive.
– m93a
Feb 15 '15 at 16:24
add a comment |
Not an archive of gzipped files but a gzip of archived files. That's why you have to extract the whole archive.
– m93a
Feb 15 '15 at 16:24
Not an archive of gzipped files but a gzip of archived files. That's why you have to extract the whole archive.
– m93a
Feb 15 '15 at 16:24
Not an archive of gzipped files but a gzip of archived files. That's why you have to extract the whole archive.
– m93a
Feb 15 '15 at 16:24
add a comment |
tar and gzip are a lot more common on *nix-es than unzip. For instance, at the moment on my arch-2009.08 there is no unzip.
6
But there isbsdtar(part oflibarchive), which handles ZIP fine.
– grawity
May 29 '10 at 19:19
Oops :"> Didn't know about that. Thanks! :-)
– nc3b
May 30 '10 at 7:22
add a comment |
tar and gzip are a lot more common on *nix-es than unzip. For instance, at the moment on my arch-2009.08 there is no unzip.
6
But there isbsdtar(part oflibarchive), which handles ZIP fine.
– grawity
May 29 '10 at 19:19
Oops :"> Didn't know about that. Thanks! :-)
– nc3b
May 30 '10 at 7:22
add a comment |
tar and gzip are a lot more common on *nix-es than unzip. For instance, at the moment on my arch-2009.08 there is no unzip.
tar and gzip are a lot more common on *nix-es than unzip. For instance, at the moment on my arch-2009.08 there is no unzip.
answered May 29 '10 at 19:04
nc3bnc3b
8591610
8591610
6
But there isbsdtar(part oflibarchive), which handles ZIP fine.
– grawity
May 29 '10 at 19:19
Oops :"> Didn't know about that. Thanks! :-)
– nc3b
May 30 '10 at 7:22
add a comment |
6
But there isbsdtar(part oflibarchive), which handles ZIP fine.
– grawity
May 29 '10 at 19:19
Oops :"> Didn't know about that. Thanks! :-)
– nc3b
May 30 '10 at 7:22
6
6
But there is
bsdtar (part of libarchive), which handles ZIP fine.– grawity
May 29 '10 at 19:19
But there is
bsdtar (part of libarchive), which handles ZIP fine.– grawity
May 29 '10 at 19:19
Oops :"> Didn't know about that. Thanks! :-)
– nc3b
May 30 '10 at 7:22
Oops :"> Didn't know about that. Thanks! :-)
– nc3b
May 30 '10 at 7:22
add a comment |
The decision basically comes down to these:
GZIP keeps Unix file permissions, as files being allowed to execute.
On the other hand ZIP works out of the box in Windows.
add a comment |
The decision basically comes down to these:
GZIP keeps Unix file permissions, as files being allowed to execute.
On the other hand ZIP works out of the box in Windows.
add a comment |
The decision basically comes down to these:
GZIP keeps Unix file permissions, as files being allowed to execute.
On the other hand ZIP works out of the box in Windows.
The decision basically comes down to these:
GZIP keeps Unix file permissions, as files being allowed to execute.
On the other hand ZIP works out of the box in Windows.
answered 15 hours ago
Alberto Salvia NovellaAlberto Salvia Novella
1561
1561
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f146754%2fon-linux-unix-does-tar-gz-versus-zip-matter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown