How get contents of tar file on tape?

How get contents of tar file on tape?

Post by Matt Seneca » Thu, 07 Nov 2002 05:39:13



Is it possible to list the contents of a tar file that resides on tape,
without copying it from the tape to disk?

To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides on
the tape. Without copying Temp.tar to disk, I want to be able to do a
"tar -tvf" on it. Is this possible?

Thanks!

 
 
 

How get contents of tar file on tape?

Post by Useko Netsum » Thu, 07 Nov 2002 17:10:25


You can try:

# tar -tvf /dev/nrst0       <- tape zero, with no rewind.

 
 
 

How get contents of tar file on tape?

Post by Jimm » Thu, 07 Nov 2002 17:10:53



> To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides on
> the tape. Without copying Temp.tar to disk, I want to be able to do a
> "tar -tvf" on it. Is this possible?

Unfortunately, there is no way to tell tar to extract to stdout, otherwise
you could pipe a tar xf into a tar tv.  So no, I don't think this is
possible.

-Jimmo

 
 
 

How get contents of tar file on tape?

Post by Joerg Schilli » Thu, 07 Nov 2002 19:15:19




>> To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides on
>> the tape. Without copying Temp.tar to disk, I want to be able to do a
>> "tar -tvf" on it. Is this possible?

>Unfortunately, there is no way to tell tar to extract to stdout, otherwise
>you could pipe a tar xf into a tar tv.  So no, I don't think this is
>possible.

star -x f=/dev/rmt/0 -to-stdout pat=Temp.tar | star -tv

ftp://ftp.fokus.gmd.de/pub/unix/star/

--



URL:  http://www.fokus.gmd.de/usr/schilling    ftp://ftp.fokus.gmd.de/pub/unix

 
 
 

How get contents of tar file on tape?

Post by b0bb » Fri, 08 Nov 2002 08:44:50


pax -f /dev/rmp/0


Quote:> Is it possible to list the contents of a tar file that resides on tape,
> without copying it from the tape to disk?

> To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides on
> the tape. Without copying Temp.tar to disk, I want to be able to do a
> "tar -tvf" on it. Is this possible?

> Thanks!

 
 
 

How get contents of tar file on tape?

Post by John Edwar » Fri, 08 Nov 2002 20:54:04



> pax -f /dev/rmp/0



> > Is it possible to list the contents of a tar file that resides on tape,
> > without copying it from the tape to disk?

> > To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides on
> > the tape. Without copying Temp.tar to disk, I want to be able to do a
> > "tar -tvf" on it. Is this possible?

> > Thanks!

That command will only give the contents of the 1st tar file not the
one inside the tar file. try this:

pax -f `pax -f /dev/rmt/0`

This assumes that the only file in the original tar file is a tar
file.

 
 
 

How get contents of tar file on tape?

Post by Matt Seneca » Thu, 07 Nov 2002 23:22:11


Thanks. I'll take a look at it.




> >> To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides
on
> >> the tape. Without copying Temp.tar to disk, I want to be able to do a
> >> "tar -tvf" on it. Is this possible?

> >Unfortunately, there is no way to tell tar to extract to stdout,
otherwise
> >you could pipe a tar xf into a tar tv.  So no, I don't think this is
> >possible.

> star -x f=/dev/rmt/0 -to-stdout pat=Temp.tar | star -tv

> ftp://ftp.fokus.gmd.de/pub/unix/star/

> --

Berlin


> URL:  http://www.fokus.gmd.de/usr/schilling

ftp://ftp.fokus.gmd.de/pub/unix
 
 
 

How get contents of tar file on tape?

Post by Matt Seneca » Thu, 07 Nov 2002 23:22:46


Thank you!



> > To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides
on
> > the tape. Without copying Temp.tar to disk, I want to be able to do a
> > "tar -tvf" on it. Is this possible?

> Unfortunately, there is no way to tell tar to extract to stdout, otherwise
> you could pipe a tar xf into a tar tv.  So no, I don't think this is
> possible.

> -Jimmo

 
 
 

How get contents of tar file on tape?

Post by Rev. Don Koo » Mon, 11 Nov 2002 01:06:56




>>To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides on
>>the tape. Without copying Temp.tar to disk, I want to be able to do a
>>"tar -tvf" on it. Is this possible?

> Unfortunately, there is no way to tell tar to extract to stdout,

        Jimmo, perhaps you should study the man page for TAR.  TAR can be piped
to standard out by using "-" as the argument to the "f" option.

        Happy to have cleared things up for you,
                        Don

--
***************************      You a bounty hunter?
* Rev. Don McDonald, SCSA *      Man's gotta earn a living.
* Baltimore, MD           *      Dying ain't much of a living, boy.
***************************      "Outlaw Josey Wales"

 
 
 

How get contents of tar file on tape?

Post by Andrew Gabri » Mon, 11 Nov 2002 01:24:31






>>>To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides on
>>>the tape. Without copying Temp.tar to disk, I want to be able to do a
>>>"tar -tvf" on it. Is this possible?

>> Unfortunately, there is no way to tell tar to extract to stdout,

>    Jimmo, perhaps you should study the man page for TAR.  TAR can be piped
> to standard out by using "-" as the argument to the "f" option.

Perhaps you should try reading the question...

Quote:>    Happy to have cleared things up for you,

Fat chance...

--
Andrew Gabriel
Consultant Software Engineer

 
 
 

How get contents of tar file on tape?

Post by Rev. Don Koo » Mon, 11 Nov 2002 02:13:15






>>>>To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides on
>>>>the tape. Without copying Temp.tar to disk, I want to be able to do a
>>>>"tar -tvf" on it. Is this possible?
>>>Unfortunately, there is no way to tell tar to extract to stdout,

>>        Jimmo, perhaps you should study the man page for TAR.  TAR can be piped
>>to standard out by using "-" as the argument to the "f" option.

> Perhaps you should try reading the question...

        Perhaps you should try reading the line of included text that I was
responding to.  I'll make it easy for you, Andy.  It's the line directly
above my response.  The one that says, "Unfortunately, there is no way
to tell tar to extract to stdout".

        Happy to have cleared things up for you,
                        Don

--
***************************      You a bounty hunter?
* Rev. Don McDonald, SCSA *      Man's gotta earn a living.
* Baltimore, MD           *      Dying ain't much of a living, boy.
***************************      "Outlaw Josey Wales"

 
 
 

How get contents of tar file on tape?

Post by Andrew Gabri » Mon, 11 Nov 2002 02:33:40








>>>>>To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides on
>>>>>the tape. Without copying Temp.tar to disk, I want to be able to do a
>>>>>"tar -tvf" on it. Is this possible?

>>>>Unfortunately, there is no way to tell tar to extract to stdout,

>>>    Jimmo, perhaps you should study the man page for TAR.  TAR can be piped
>>>to standard out by using "-" as the argument to the "f" option.

>> Perhaps you should try reading the question...

>    Perhaps you should try reading the line of included text that I was
> responding to.  I'll make it easy for you, Andy.  It's the line directly
> above my response.  The one that says, "Unfortunately, there is no way
> to tell tar to extract to stdout".

OK, I give up then. How do you tell tar to extract to stdout?

Quote:>    Happy to have cleared things up for you,

Not yet you haven't...

--
Andrew Gabriel
Consultant Software Engineer

 
 
 

How get contents of tar file on tape?

Post by Jimm » Mon, 11 Nov 2002 03:14:10







> >>>>Unfortunately, there is no way to tell tar to extract to stdout,

> >>> Jimmo, perhaps you should study the man page for TAR.  TAR can be
piped
> >>>to standard out by using "-" as the argument to the "f" option.

> >> Perhaps you should try reading the question...

> > Perhaps you should try reading the line of included text that I was
> > responding to.  I'll make it easy for you, Andy.  It's the line directly
> > above my response.  The one that says, "Unfortunately, there is no way
> > to tell tar to extract to stdout".

> OK, I give up then. How do you tell tar to extract to stdout?

Hehe...I didn't see what he wrote because I plonked this individual a
while back.  I saw in someone elses follow up that he claimed to have
one of the highest recorded SCSA ratings...which seems incongruous with
him making such a simple gaffe on the usage of tar.  Too funny!

-Jimmo

 
 
 

How get contents of tar file on tape?

Post by Rev. Don Koo » Mon, 11 Nov 2002 04:38:50








>>>>>>To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides on
>>>>>>the tape. Without copying Temp.tar to disk, I want to be able to do a
>>>>>>"tar -tvf" on it. Is this possible?

>>>>>Unfortunately, there is no way to tell tar to extract to stdout,

>>>>        Jimmo, perhaps you should study the man page for TAR.  TAR can be piped
>>>>to standard out by using "-" as the argument to the "f" option.

>>>Perhaps you should try reading the question...

>>        Perhaps you should try reading the line of included text that I was
>>responding to.  I'll make it easy for you, Andy.  It's the line directly
>>above my response.  The one that says, "Unfortunately, there is no way
>>to tell tar to extract to stdout".
> OK, I give up then. How do you tell tar to extract to stdout?

        Easy, my confused young friend.  Use "tar cvf - <files>" and it will
extract the files to standard out where they can be piped to any number
of follow-on processes.  It's a very simple process that you should
already have known about.

        Happy to have cleared things up for you,
                        Don

--
***************************      You a bounty hunter?
* Rev. Don McDonald, SCSA *      Man's gotta earn a living.
* Baltimore, MD           *      Dying ain't much of a living, boy.
***************************      "Outlaw Josey Wales"

 
 
 

How get contents of tar file on tape?

Post by Andrew Gabri » Mon, 11 Nov 2002 04:59:35










>>>>>>>To clarify, if I do a "tar -tv", I see that the file "Temp.tar" resides on
>>>>>>>the tape. Without copying Temp.tar to disk, I want to be able to do a
>>>>>>>"tar -tvf" on it. Is this possible?

>>>>>>Unfortunately, there is no way to tell tar to extract to stdout,

>>>>>    Jimmo, perhaps you should study the man page for TAR.  TAR can be piped
>>>>>to standard out by using "-" as the argument to the "f" option.

>>>>Perhaps you should try reading the question...

>>>    Perhaps you should try reading the line of included text that I was
>>>responding to.  I'll make it easy for you, Andy.  It's the line directly
>>>above my response.  The one that says, "Unfortunately, there is no way
>>>to tell tar to extract to stdout".

>> OK, I give up then. How do you tell tar to extract to stdout?

>    Easy, my confused young friend.  Use "tar cvf - <files>" and it will
> extract the files to standard out where they can be piped to any number
> of follow-on processes.  It's a very simple process that you should
> already have known about.

Wrong answer (hint -- tar option 'c' doesn't extract anything).

Quote:>    Happy to have cleared things up for you,

If only...

--
Andrew Gabriel
Consultant Software Engineer

 
 
 

1. getting a tar file off a tape when you've tar cf'ed first

I friend of mine managed to use the tar cf comamnd when he wanted to
do a tar xf. He stopped it when he realized what he had done
but obviously tar now doesn't believe the file is there.
Is there anyway to extract, at least partially, the contents of
the tape? Perhaps with dd?

Thanks,

Craig Barnes

2. HP Deskjet 720c printer drivers

3. display the file contents of a large tar.Z file

4. Does NCSA1.4 work on Solaris 2.3

5. Modems failing to answer

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

7. SIGCHLD and core files

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

9. tar file size limit and tar to tape

10. Multi tapes with tar/Tar tape length

11. examine tar tape content command over the network

12. File too large when tar 8GB file through NFS server to tape