Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, Why are some files converted to TARs, then compressed using GZIP? Why aren't they just compressed using GZIP instead of first converting them to TARs? I just created some ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    4

    Advantages of using TAR.GZ vs. GZ


    Hi,

    Why are some files converted to TARs, then compressed using GZIP? Why aren't they just compressed using GZIP instead of first converting them to TARs? I just created some TAR.GZ and GZ files using PeaZip, and the size of each file was the same.

    Thanks,

    Richard

  2. #2
    Linux Engineer valemon's Avatar
    Join Date
    Oct 2006
    Location
    Volos
    Posts
    934
    Hello

    tar is a tool used for gathering many files into a single big one. So when you use gzip to a .tar file you are compressing a single file rather many smaller files.
    Linux is like a Teepee, No Windows, No Gates, Only Apache Inside!
    Arch Linux
    Linux user #442041

  3. #3
    Just Joined!
    Join Date
    Jul 2010
    Posts
    4
    ok. Thanks.

  4. #4
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    699
    many files (especialy text) will compress better if compressed as 1 big file, instead of many smaller ones. I'm no expert on compression .... but these guys claim to be.
    howstuffworks

    If you're just putting 1 file into a tar, then gzipping it, you're going to get (roughly) the same size. but tarring many files, and your compression ration will be better than all files compressed seperately, because of more patterns that repeat.
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •