tar xzf file or tar -xzf file?

tar xzf file or tar -xzf file?

Post by Bart » Sat, 11 May 2002 03:36:41



Hi,

is there a difference between:
tar xzf    file.tar.gz and
tar -xzf   file.tar.gz ?

i could'nt find it in manpages

thanks
Bart

 
 
 

tar xzf file or tar -xzf file?

Post by Dragan Cola » Sat, 11 May 2002 03:42:14



> is there a difference between:
> tar xzf    file.tar.gz and
> tar -xzf   file.tar.gz ?

> i could'nt find it in manpages

Then you haven't read the man page carefully enough.

SYNOPSIS
       tar  [-] ...
            ^^^
            this tells you that the hypghen is optional

You could also just have tried it to find out.

Dragan

 
 
 

tar xzf file or tar -xzf file?

Post by Lee Sau Da » Tue, 14 May 2002 16:24:41


    Bart> Hi, is there a difference between:
    Bart> tar xzf file.tar.gz and
    Bart> tar -xzf file.tar.gz ?

The  first one  is the  correct form.   The second  form is  in theory
INCORRECT.  

However,  this  mistaken  has  been observed  so  commonly  throughout
decades that  the developers of GNU  tar decided long ago  to make GNU
tar tolerate with  the second form.  Note that  this kind of tolerance
applies  only   to  GNU  tar,  and   may  not  be   present  in  other
implementations of 'tar' (such as those on Solaris, AIX, IRIX, HP-UX).
Now  that you've discovered  the first  form, it's  better for  you to
learn to stick  with the first form, so that when  you have the chance
to use  other Unices,  you won't get  stuck there wondering  why 'tar'
doesn't work as  you're used to.  (Of course, GNU  tar has been ported
to all major Unices, but whether  the local admin has installed it and
taken away the "native" tar is not a predictable parameter.)

    Bart> i could'nt find it in manpages

You should.

From "              30 October 2000                   TAR(1)":

        The first argument to tar must
        be one of the options: Acdrtux, followed by  any  optional
        functions.  

--


Home page: http://www.informatik.uni-freiburg.de/~danlee

 
 
 

1. Child process error on tar xzf

This may be a well known occurence, but I wouldn't mind knowing if it is
just my system.

When I execute `tar xzf compressed-tarfile.tar.gz` I sometimes get
(depends on the tar file) the following error message when it gets to the
end.

Is this common? Whats happening here?

Oh and btw `gzip -cd compressed-tarfile.tar.gz | tar xf -` gets the same
thing. Understandable! That is basically what tar is doing. Even so,
doing a seperate `gzip -d compressed tarfile.tar.gz` and `tar xf tarfile.tar`
works without any messages.

The files it gets out of the archive all look okay, but I'm never quite
as trusting with them.

Any explanations??!!

Paul
--
*******************************************************************************

Microelectronics,
Brunel University, London U.K.
*******************************************************************************

2. Installing Debian via PCMCIA (on laptop)

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

4. RC5-64 and AMD K6-2 400

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

6. nmakefile

7. backup multiple tar-files on a tape using tar and mt - command

8. Dynamic loading of tcl libs with linux?

9. Extracting files with tar and uncompress fails with tar: Archive - EOF not on block boundary

10. How does one compres files in this .tar.gz .Z and .tar.Z

11. backup multiple tar-files on a tape using tar & mt ???

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

13. tar file size limit and tar to tape