1820884 Members
3587 Online
109628 Solutions
New Discussion юеВ

cpio

 
Prathap_1
Advisor

cpio

Hi
Can anyone give me the cpio command syntax to read and extract the contents from tape.

Thanks
Prathap.
3 REPLIES 3
melvyn burnard
Honored Contributor

Re: cpio

You would need to know most of the options used to create the tape if it is cpio.
You may want to look at using pax to read it.
man pax
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
S.K. Chan
Honored Contributor

Re: cpio

Some example that you may give it a shot... (remember cpio is very particular with what options you used)
# cpio -ictv < /dev/rmt/1m
==>verify what is on the tape
# cpio -iudmcx < /dev/rmt/1m
==>restore all files on tape
# cpio -icvdxumB < /dev/rmt/1m
==>restore one file
A. Clay Stephenson
Acclaimed Contributor

Re: cpio

Hi:

You need to repeat all those combinations but also leave off the 'c' option. 'c' means ASCII header format; no 'c' means binary header data. There's jusy no way to know and you may have to send the data through dd if the data was reblocked.

I would start with these:

cpio -icBvt < /dev/rmt/0m
cpio -iBvt < /dev/rmt/0m
cpio -icvt < /dev/rmt/0m
cpio -ivt < /dev/rmt/0m

Those are all safe and one of them should at least give you a partial listing. If you get a partial listing, you know that you next need to fight the blocking factor.
If it ain't broke, I can fix that.