tar tvf from tape backeped using

Hi,

The scenario is as follow:

Backup was done using:
tar cvf /dev/rmt/0mn file1.ext
tar cvf /dev/rmt/0mn file2.ext
tar cvf /dev/rmt/0mn file3.ext
tar cvf /dev/rmt/0mn file4.ext
tar cvf /dev/rmt/0mn file5.ext

When I do; tar tvf /dev/rmt/0m,
it only gives me the first file on the tape ( I rewinded the tape
before issuing the command )

My question is; how do I list all the files in the tape, by using one command only? and also restore all files from tape by using one command only?

Thanks!!

I don't believe you can - but you can use a for loop to repeat the command a number of times. For example, in csh you can issue the repeat command - $ repeat 4 tar tvf /dev/rmt/0mn and it should run through all the files. Note I added the n on the tape device which tells it NOT to rewind after the command if finished (or you would get the first file listed 4 times). A for loop in ksh can do the same thing