Reference: cpio
cpio
cpio
control_options [options]cpio -i[options] [patterns]cpio -o[options]cpio -p[options] directory
Comparison of Valid Options
i: 6 b B c C d E f H I k m M r R s S t u v V o: a A B c C H L M O v V p: a d l L m P R u v V
Options
-a-
Reset access times of input files.
-A-
Append files to an archive (must use with
-O). -b-B-c-
-Cn-d-
Create directories as needed.
-Efile-
Extract filenames listed in file from the archive.
-f-Hformat-Ifile-
-k-l-
Link files instead of copying. Can be used only with
-p. -L-
Follow symbolic links.
-m-Mmsg-Ofile-
-P-r-
Rename files interactively.
-RID-
Reassign file ownership and group information of extracted files to the user whose login ID is ID (privileged users only).
-s-S-t-
-u-v-
Print a list of filenames.
-V-
Print a dot for each file read or written (this shows cpio at work without cluttering the screen).
-6
Examples
find . -name "*.old" -print | cpio -ocBv > /dev/rmt/0
cpio -icdv "*save*" < /dev/rmt/0
find . -depth -print | cpio -padml /mydir





