CPIO(1) UNIX Reference Manual CPIO(1) NNAAMMEE ccppiioo - copy file archives in and out SSYYNNOOPPSSIISS ccppiioo --oo [--aaccBBvv] ccppiioo --ii [--BBccddmmrrttuuvvffssSSbb66] [_p_a_t_t_e_r_n_s] ccppiioo --pp [--aaddllmmrruuvv] _d_i_r_e_c_t_o_r_y DDEESSCCRRIIPPTTIIOONN CCppiioo has three functional modes; copy out, copy in and pass. Functional Options: --oo Copy out - reads the standard input to obtain a list of path names and copies those files onto the standard output together with path name and status information. Output is padded to a 512-byte boun- dary. --ii Copy in - extracts files from the standard input, which is assumed to be the product of a previous ccppiioo --oo. Only files with names that match patterns are selected. Patterns are given in the name- generating notation of sh(1). In patterns, meta-characters `?', `*', and `[...]' match the slash `/' character. Multiple patterns may be specified and if no patterns are specified, the default for patterns is `*' (i.e., select all files). The extracted files are conditionally created and copied into the current directory tree based upon the options described below. The permissions of the files will be those of the previous ccppiioo --oo. The owner and group of the files will be that of the current user unless the user is super-user, which causes ccppiioo to retain the owner and group of the files of the previous ccppiioo --oo. --pp Pass - reads the standard input to obtain a list of path names of files that are conditionally created and copied into the destina- tion directory tree based upon the options described below. Options for the above functional options: --aa Reset access times of input files after they have been copied. --BB Input/output is to be blocked 5,120 bytes to the record (does not apply to the pass options; meaningful only with data directed to or from /_d_e_v/_r_m_t/??). --dd Directories are to be created as needed. --cc Write header information in ASCII character form for portability. --rr Interactively rename files. If the user types a null line, the files is skipped. --tt Print a table of contents of the input. No files are created. --uu Copy unconditionally (normally, an older file will not replace a newer file with the same name). --vv Verbose: causes a list of file names to be printed. When used with the t option, the table of contents looks like the output of an `ls -l' command (see ls(1)). --ll Whenever possible, link files rather than copying them. Usable only with the --pp option. --mm Retain previous file modification time. This option is ineffective on directories that are being copied. --ff Copy in all files except those in patterns. --ss Swap bytes. Use only with the --ii option. --SS Swap halfwords. Use only with the --ii option. --bb halfwords. Use only with the --ii option. --66 Process an old (i.e., UNIX System Sixth Edition format) file. Only useful with --ii (copy in). EEXXAAMMPPLLEESS The first example below copies the contents of a directory into an ar- chive; the second duplicates a directory hierarchy: ls | cpio -o >/dev/rmt/0m cd olddir find . -depth -print | cpio -pdl newdir The trivial case find . -depth -print | cpio -oB >/dev/fmt/0m can be handled more efficiently by: find . -cpio /dev/rmt/0m SSEEEE AALLSSOO ar(1), find(1), ls(1), cpio(4) HHIISSTTOORRYY The ccppiioo command appeared in System V AT&T UNIX. This program is derived from the System V AT&T sources which were contributed to the public domain by AT&T. BBUUGGSS Path names are restricted to 128 characters. If there are too many unique linked files, the program runs out of memory to keep track of them and, thereafter, linking information is lost. Only the super-user can copy special files. The --BB option does not work with certain magnetic tape drives.