1753511 Members
5240 Online
108795 Solutions
New Discussion юеВ

untar using cpio

 
SOLVED
Go to solution
Sridhar R
Regular Advisor

untar using cpio

Hi,

I have as_hp_itanium_101202_disk1.cpio file.

I need to untar it using cpio command.

Kindly provide me the syntax.

Thanks !!
3 REPLIES 3
Dennis Handly
Acclaimed Contributor
Solution

Re: untar using cpio

(You uncpio it, not untar.)
You can either use cpio(1) or pax(1):
cpio -id < as_hp_itanium_101202_disk1.cpio
pax -r -f as_hp_itanium_101202_disk1.cpio
Sridhar R
Regular Advisor

Re: untar using cpio

Hi,

Thanks dennis.

At the same time, i would like to know the vice versa of this as well.

i.e., how to make files and directories into .cpio format.

Thanks!!

Dennis Handly
Acclaimed Contributor

Re: untar using cpio

>how to make files and directories into .cpio format.

You can use cpio(1) or pax(1):
pax -w -f foo.cpio -x cpio file ...
echo file ... | cpio -o > foo.cpio

You can also feed find(1) output into cpio.