[comp.unix.questions] tar from a disk

gefuchs@goedel.uucp (Gill E. Fuchs) (05/06/89)

i have in my directory a file named  gugu.tar  which i assume is
a tarfile.

now, what i would like to do is restore it unto my directory

in my feeble attemp to do so i tried:
        tar x gugu.tar
to which i was wipped with the response:
        "yo, no tape on line" {translated a bit}

so, what to do?

gill
deep within the tar pit

jeff@quark.WV.TEK.COM (Jeff Beadles;X2568;61-215) (05/07/89)

In article <1517@cmx.npac.syr.edu> gefuchs@logiclab.cis.syr.edu (Gill E. Fuchs) writes:
 >i have in my directory a file named  gugu.tar  which i assume is
 >a tarfile.

 >now, what i would like to do is restore it unto my directory

 >in my feeble attemp to do so i tried:
 >        tar x gugu.tar
 >to which i was wipped with the response:
 >        "yo, no tape on line" {translated a bit}
 >

Try this:  tar xf gugu.tar

The f option specifies the file/device to get extract to/from.

	-Jeff
--
Jeff Beadles		Utek Sustaining Engineering, Tektronix Inc.
jeff@quark.WV.TEK.COM

gwyn@smoke.BRL.MIL (Doug Gwyn) (05/08/89)

In article <1517@cmx.npac.syr.edu> gefuchs@logiclab.cis.syr.edu (Gill E. Fuchs) writes:
>in my feeble attemp to do so i tried:
>        tar x gugu.tar
>so, what to do?

Well, you might RTFM.
It explains how to invoke "tar" properly.
(Hint: "f" option.)

ray3rd@ssc-vax.UUCP (Ray E. Saddler III) (05/08/89)

In article <1517@cmx.npac.syr.edu>, gefuchs@goedel.uucp (Gill E. Fuchs) writes:
> i have in my directory a file named  gugu.tar  which i assume is a tarfile.
> 
> in my feeble attemp to do so i tried:
>         tar x gugu.tar
> 
> so, what to do?

Uhm...you need to place 'f' along with the 'x' flag to tell tar to
eXtract from a File, followed by the file name (which you placed
correctly):

     'tar xf gugu.tar' should do the trick.
     
You may first want to 'tar -tf gugu.tar' to lisT the file first to
check for absolute pathnames or regular filenames that may hammer 
something you want to keep, resulting in explicit name extraction:

     'tar -xf gugu.tar' file1 file2 file3 ...
-- 
Ray E. Saddler III       |    __  __ __       __ |          UseNet
Boeing Aerospace         |   / / / //   //| //   | uw-beaver!ssc-vax!ray3rd
P.O. Box 3999 m.s. 3R-05 |  /-< / //-  // |// _  |         PhoneNet
Seattle, Wa.  98124  USA | /__//_//__ //  //__/  |      1+206-657-2824

yoly@maxwell.Concordia.CA ( Yoly Young % ILDCD22 % c10112 % 7633) (05/10/89)

In article <1517@cmx.npac.syr.edu> gefuchs@logiclab.cis.syr.edu (Gill E. Fuchs) writes:
>i have in my directory a file named  gugu.tar  which i assume is
>a tarfile....restore it unto my directory
>
>in my feeble attemp to do so i tried:
>        tar x gugu.tar
>to which i was wipped with the response:
>        "yo, no tape on line" {translated a bit}

You should try:

	cat gugu.tar | tar xvf -

That command lets you restore tar files from a "tar file" :-)

jik@athena.mit.edu (Jonathan I. Kamens) (05/10/89)

In article <830@sunkisd.CS.Concordia.CA> yoly@maxwell.Concordia.Ca writes:
>You should try:
>
>	cat gugu.tar | tar xvf -
>
>That command lets you restore tar files from a "tar file" :-)

  And you should try:

* Reading the answers that have already been posted to a question
  before posting an answer yourself (admittedly, you may not have
  gotten the other answers yet at your site, but I doubt that, since
  we got this one pretty quickly).
* Reading the man page for tar or in some other way getting a clue.

  I should probably explain more specifically what I mean by the
second item above, so I will.  The 'f' option to tar specifies,
according to the man page for tar, "the name of the archive instead of
/dev/rmt?."  Furthermore, "If the name of the file is `-', tar writes
to standard output or reads from standard input, whichever is
appropriate."

  Therefore, the command you gave will work, surely.  However, let me
ask you this.... why shouldn't the person who asked the question just
use "tar xvf gugu.tar?"

Jonathan Kamens			              USnail:
MIT Project Athena				410 Memorial Drive, No. 223F
jik@Athena.MIT.EDU				Cambridge, MA 02139-4318
Office: 617-253-4261			      Home: 617-225-8218

"People who haven't read man pages shouldn't play with the 'f' key in
			comp.unix.questions."

fawcett@steven.COM (fawcett) (05/16/89)

In article <1517@cmx.npac.syr.edu>, gefuchs@goedel.uucp (Gill E. Fuchs) writes:
> i have in my directory a file named  gugu.tar  which i assume is
> a tarfile.
> 
> now, what i would like to do is restore it unto my directory
> 
> in my feeble attemp to do so i tried:
>         tar x gugu.tar
> to which i was wipped with the response:
>         "yo, no tape on line" {translated a bit}
> 

You can do what you want simply by replacing the name of the tape drive
with the name of the file you want.  I.E.

    tar xvf  gugu.tar

will read gugu.tar and create (in the local directory) the files contained
in gugu.tar.

If you want to put the output somewhere else, either cd to the new
directory and add the full pathname of the input file, or use the more
complex redirection scheme.  I.E.:

   tar xvf - < gugu.tar

Either one should do the job for you.


John W. Fawcett             -----   -----   -----    -----    -----    ------
Software Engineer          /          /    /        /    /   /    /   /     /
Sierra Geophysics, Inc .   -----     /    /---     /-----   /-----   /-----/
P.O. Box 3886                  /    /    /        /   \    /  \     /     /
Seattle, Wa.  98124      -----   -----   -----   /     \  /    \   /     /

Voice: (206) 822-5200    uucp: ..!uw-beaver!sumax!quick!ole!steven!fawcett