how to handle a .tar file

how to handle a .tar file

Post by Dieter Hanse » Thu, 01 May 1997 04:00:00



Hi,

not being very familiar with Unix I have a simple (not for me:( )
question.
I have got two file with a .tar extension:
  file1.tar.gz
and
  file2.tar.Z

How to use this with the command tar?

Thanks
  Dieter Hansen
---------------

 
 
 

how to handle a .tar file

Post by Herve Couppe de Lahongrais - CD » Thu, 01 May 1997 04:00:00



> Hi,

> not being very familiar with Unix I have a simple (not for me:( )
> question.
> I have got two file with a .tar extension:
>   file1.tar.gz
> and
>   file2.tar.Z

> How to use this with the command tar?

> Thanks
>   Dieter Hansen
> ---------------

The first one is a gzip file, created by the gzip command (from GNU).
Basically, this is a tar file being compressed. To uncompress and untar
this file, use the
following command :

        gzcat file2.tar.gz | tar xvf -

The second one is a tar-compressed file, created by the Unix compress
command applied to a tar file (e.g. tar cf - <files> | compress >
file2.tar.Z). To uncompress and untar this file, use the following
command :

        zcat file2.tar.Z | tar xvf -
or

        gzcat file2.tar.Z | tar xvf -

--
Herve Couppe de Lahongrais (SEU)       | Eurocontrol Experimental Centre


 
 
 

how to handle a .tar file

Post by Leonid Feygi » Thu, 01 May 1997 04:00:00


I came across so-called "tar-gzipped" files with file names like
   file1.tzg

How to "unscramble" such a file?  I tried both to apply gunzip first,
and to apply tar first.  Both commands complain about wrong format.

--Leonid Feygin

 
 
 

how to handle a .tar file

Post by N J Bail » Thu, 01 May 1997 04:00:00




> > Hi,

> > not being very familiar with Unix I have a simple (not for me:( )
> > question.
> > I have got two file with a .tar extension:
> >   file1.tar.gz
> > and
> >   file2.tar.Z

> > How to use this with the command tar?

> > Thanks
> >   Dieter Hansen
> > ---------------

> The first one is a gzip file, created by the gzip command (from GNU).
> Basically, this is a tar file being compressed. To uncompress and untar
> this file, use the
> following command :

>         gzcat file2.tar.gz | tar xvf -

> The second one is a tar-compressed file, created by the Unix compress
> command applied to a tar file (e.g. tar cf - <files> | compress >
> file2.tar.Z). To uncompress and untar this file, use the following
> command :

>         zcat file2.tar.Z | tar xvf -
> or

>         gzcat file2.tar.Z | tar xvf -

> --
> Herve Couppe de Lahongrais (SEU)       | Eurocontrol Experimental Centre


Or use TkZip http://www.pcnet.com/~proteus/TkZip/TkZip.html

Nick.

--
-------------------------------------------------------------------------------
Dr N J Bailey                           Telephone: +44 113 233 2057
Lecturer in Electronic Engineering      Facsimile: +44 113 233 2032    
University of Leeds                     Home page:
Woodhouse Lane  
http://www.elec-eng.leeds.ac.uk/staff/een6njb/N.J.Bailey.html
Leeds LS2 9JT
United Kingdom
===============================================================================

 
 
 

how to handle a .tar file

Post by Bill Marc » Fri, 02 May 1997 04:00:00


In article


>Hi,

>not being very familiar with Unix I have a simple (not for me:( )
>question.
>I have got two file with a .tar extension:
>  file1.tar.gz
>and
>  file2.tar.Z

>How to use this with the command tar?

gunzip file1.tar.gz
tar xf file1.tar

gunzip file2.tar.Z
tar xf file2.tar

--
Bill Marcum    bmarcum at iglou dot com
If gnus are outlawed, only outlaws will have gnus.

 
 
 

how to handle a .tar file

Post by Rich K » Sat, 03 May 1997 04:00:00





>: I came across so-called "tar-gzipped" files with file names like
>:    file1.tzg
>:
>: How to "unscramble" such a file?  I tried both to apply gunzip first,
>: and to apply tar first.  Both commands complain about wrong format.

>*sigh* man mv.

>--Dave
>--
>--> http://www.aeon.net/~dbrown/

   I agree about mv; also if you have gnu tar which recongizes
   .tgz extendion.

   richk

 
 
 

how to handle a .tar file

Post by Lucio Chiappett » Tue, 06 May 1997 04:00:00




> >I have got two file with a .tar extension:
> >  file1.tar.gz
> >  file2.tar.Z

> >How to use this with the command tar?

> gunzip file1.tar.gz
> tar xf file1.tar

> gunzip file2.tar.Z           OR   uncompress file2.tar.Z
> tar xf file2.tar

(not all Unixes have gzip/gunzip/gzcat, all have compress/uncompress/zcat,
which for me remains a good reason to use .Z and not .gz files)

Also and anyhow, the above commands can also be combined in a pipeline,
avoiding the creation of the uncompressed file on disk :

  gzcat file1.tar.gz | tar xvf -
   zcat file2.tar.Z  | tar xvf -

                               ^this minus (meanign standard input) is
                                necessary !!

----------------------------------------------------------------------------
Lucio Chiappetti - IFCTR/CNR - via Bassini 15 - I-20133 Milano (Italy)      
----------------------------------------------------------------------------
Fuscim donca de Miragn        E tornem a sta scio' in Bregn                
Che i fachign e i cortesagn   Magl' insema no stagn begn                    
Drizza la', compa' Tapogn                            (Rabisch, II 41, 96-99)
----------------------------------------------------------------------------
For more info : http://www.ifctr.mi.cnr.it/~lucio/personal.html            
----------------------------------------------------------------------------

 
 
 

how to handle a .tar file

Post by Scott Tompkin » Wed, 07 May 1997 04:00:00


Quote:> not being very familiar with Unix I have a simple (not for me:( )
> question.
> I have got two file with a .tar extension:
>   file1.tar.gz

gzip -d file1.tar.gz
tar -xvf file1.tar

Quote:> and
>   file2.tar.Z

uncompress file2.tar.gz
tar -xvf file2.tar
Quote:

> How to use this with the command tar?

> Thanks
>   Dieter Hansen
> ---------------

 
 
 

1. tarzfaq.txt What are and how to handle tar.Z and tar.gz files

Thu 11-Aug-94: Made available the following FAQ (Frequently Asked
Question) answer

 2785 Aug 11 08:49 garbo.uwasa.fi:/unix/ts/tarzfaq.txt
 tarzfaq.txt What are and how to handle tar.Z and tar.gz files

   All the best, Timo

..................................................................
Prof. Timo Salmi      Co-moderator of comp.archives.msdos.announce
Moderating at garbo.uwasa.fi anonymous FTP  archives  128.214.87.1
Faculty of Accounting & Industrial Management; University of Vaasa

2. empty options using getopts

3. tar doesn't handle 2GB+ files

4. Kernel Compiling Question

5. handling both relative path and the file size limit during tar operation

6. FreeBSD Boot Question

7. Gnu Tar (1.11.2) handling sparse files

8. chfn with "&"

9. handling both relative path and the file size limit during tar operation

10. 'tar.gz' files. How to handle.

11. Wanted: rcmd host tar x_?_vqf file.tar file1 ... fileN | tar xvf -

12. tar xzf file or tar -xzf file?

13. Scripting Help: tar a dir with time and date as file tar file name..................TIA