1753622 Members
5662 Online
108797 Solutions
New Discussion юеВ

cpio

 
Prathap_1
Advisor

cpio

Hi
I am trying to read the contents of the tape with the cpio -icBvt /dev/rmt/1m. It is getting hanged there. Can anyone help me out. Help me out in extracting the tape to disk.

Thanks
Prathap.
29 REPLIES 29
harry d brown jr
Honored Contributor

Re: cpio


DO this:

dd if=/dev/rmt/1m of=/large_diskarea


live free or die
harry
Live Free or Die
Sanjay_6
Honored Contributor

Re: cpio

Hi Pratap,

Try

cpio -itBv < /dev/rmt/1m

Are you using the redirector "<". Also You are using the "c" as well as "t" option,

c --> Copy (extract)
t --> List Contents (No extract)

Try this,

cpio -itBvdl < /dev/rmt/1m
to list contents of tape

cpio -icBvdul < /dev/rmt/1m
to extract contents of tape to disk. Keep an eye on the path it is extracting to.

Hope this helps.

Regds
S.K. Chan
Honored Contributor

Re: cpio

You must use the same options to read the tape that were used to write it.
# cpio -itcvB < /dev/rmt/1m
should work.
Prathap_1
Advisor

Re: cpio

Hi Sanjay
Thanks for the info. I have tried the options given by you. I am getting the error called 'Out of Phase--get help', Perhaps the C option should not be used.

Thanks
Prathap.
H.Merijn Brand (procura
Honored Contributor

Re: cpio

don't forget the (too large) block size in order not to miss any bits:

dd if=./dev/rmt/1m ibs=102400 of=tape.cpio
file tape.cpio

if cpio still has trouble reading the data, try to use GNU's version of cpio and omit the -c argument. GNU's cpio will try to find out itself and understands more cpio formats than native HP-UX cpio.

GNU cpio can be found and installed from e.g. ftp://download.xs4all.nl/pub/mirror/gnu/cpio/cpio-2.4.2.tar.gz (I couln't find a precompiler binary for HP-UX)
Enjoy, Have FUN! H.Merijn
Prathap_1
Advisor

Re: cpio

Hi Sanjoy
I tried the solutions given in the links. Still I am getting the error. If I specify the 'c' option, I am getting the error C option should not be used. I I did't specify the 'c' option, I am getting the error 'C' option should be used.

Thanks
Prathap.
H.Merijn Brand (procura
Honored Contributor

Re: cpio

Here's a precompiled GNU cpio binary

put it somewhere in your path and issue

# ncpio --io-size=102400 -i -t -v
and tell us what happens
Enjoy, Have FUN! H.Merijn
Aftab Sadiq
Advisor

Re: cpio

Hi Prathap,
Did you rewind the tape first? Rewind the tape first with
mt -t /dev/rmt/1m rew
and then use cpio command to list the contents

I hope this will help

Aftab