Are tar.gz and tgz the same thing?

前端 未结 4 1869
北海茫月
北海茫月 2021-01-30 12:27

I created .tgz file with tar czvf file command.then I ended up with a tgz file. I want to know the difference between it and tar.gz.

相关标签:
4条回答
  • 2021-01-30 12:32

    I think in the old package repo days, .tgz was used because files on Dos floppies could only have three letter extensions. When this limitation was removed .tar.gz was used to be more verbose by showing both the archive type (tar) and zipper (gzip).

    They are identical.

    0 讨论(0)
  • 2021-01-30 12:36

    There's no difference at all. .tgz is simply shorthand for .tar.gz.

    0 讨论(0)
  • 2021-01-30 12:48

    One difference is that browsers seem to have trouble with .tar.gz sometimes, for example, when downloading such a file that already exists locally, it can happen, that they rename it to .tar-1.gz, which will then create problems with certain archivers, mostly on Windows and other environments that use filename ending for file type designation.

    This doesn't happen with .tgz ending.

    0 讨论(0)
  • 2021-01-30 12:55

    You can unzip tar.gz or .tgz with:

    tar -xzvf
    

    and create with:

    tar -czvf
    

    It is absolutely the same

    0 讨论(0)
提交回复
热议问题