On Thu, Sep 13, 2001 at 03:02:13PM -0400, David Z Maze wrote:
> shyamk <shyamk@eth.net> writes:
> shyamk> What is tgz and how do you decompress it ?
> shyamk> I undertand for gzip it is gunzip , for tar it i tar xvf
>
> Typically, foo.tgz is a shorthand filename for foo.tar.gz, so 'gunzip
> foo.tgz; tar xf foo.tar' should work. As a shorthand using GNU tar
> (the tar included with Debian, for example), you can just do 'tar xzf
> foo.tgz'.
I always learned that .tgz meant the file was created via "tar czf
..." while tar.gz meant the file was a tarball that was compressed
("tar cf - | gzip -9"; "tar cf file.tar ... && gzip -9 file.tar",
etc.)
Note that it's not quite the same:
nnorman@canaris:~ $ tar czf test.tgz drm
nnorman@canaris:~ $ tar cf - drm | gzip -9 > test.tar.gz
nnorman@canaris:~ $ ll test.*
-rw-rw-r-- 1 nnorman nnorman 153609 Sep 13 14:54 test.tar.gz
-rw-rw-r-- 1 nnorman nnorman 155636 Sep 13 14:54 test.tgz
Of course both files can be read via "tar zxf" or "zcat file | tar x",
so my point (if there is one :) is that tarring then compressing is
more efficient.
--
Nathan Norman - Staff Engineer | A good plan today is better
Micromuse Ltd. | than a perfect plan tomorrow.
mailto:nnorman@micromuse.com | -- Patton
Attachment:
pgpU6h3zFqFGq.pgp
Description: PGP signature