Previous Section  < Day Day Up >  Next Section

cpio—copies file archives in and out


cpio –i [ bBcdfkmrsStuvV6 ] [ –C bufsize ] [ –E filename ]

  [ –H header ] [ –I filename [ –M message ] ] [ –R id ]   [ pattern ... ]

cpio –o [ aABcLvV ] [ –C bufsize ] [ –H header ]

  [ –O filename [ –M message ] ]

cpio –p [ adlLmuvV ] [ –R id ] directory


cpio copies file archives according to the modifiers given, usually for backup to a tape or directory.

Example A.16.

find . -depth -print | cpio -pdmv /home/john/tmp


EXPLANATION

Starting at the current directory, find descends the directory hierarchy, printing each entry of the directory even if the directory does not have write permission, and sends the filenames to cpio to be copied into the john/tmp directory in the /home partition.

    Previous Section  < Day Day Up >  Next Section