Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CPIO function

Status
Not open for further replies.

tao

MIS
Feb 3, 2000
12
0
0
FR
Hi everybody,

I use generally TAR compress function on UNIX but I'm really new using CPIO.
I've got an archive tape which has been done using "more liste.txt > cpio -ocvB /dev/rmt/0mb"
Today, I have to get back a file which is located on this archive and I've got problems.
I did try : cpio -icvB "toto.txt" /dev/rmt/0mb
The tape reader run a long time but at the end, the file is not present on my system.
I did try to add the new location at the end of my command as cpio -icvB "toto.txt" /dev/rmt/0mb /tmp/titi.txt
The result is the same.

Could you help me to understand this command and the way I've to get my file back ?
Thanks in advance,
[sig][/sig]
 
To restore a file you need especify the path.
Follow this steps:
1 - #cpio -itcvB < /dev/rmt/0m
This command will be list the entire tape.
2 - Verify the files listeds and yours paths
example:
a - tmp/toto.txt or
b - /tmp/toto.txt
3 - To return the file /tmp/toto.txt in example a, you need execute the following command:
#cpio -icvdumB /tmp/toto.tx < /dev/rmt/0m

4 - To return the file tmp/toto.txt in example b, you need execute the following comando:
#cpio -icvdumB tmp/toto.txt < /dev/rmt/0m
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top