18 August 2009

cpio examples

To create an archive
find . | cpio -ocvB > x.cpio

Read an archive:
cpio -itcvB -I x.cpio

Read a file from archive:
cpio -itcvB -I x.cpio ".ssh/known_hosts"

Restore the file (remove the t option).
cpio -icvB -I x.cpio ".ssh/known_hosts"

No comments: