[0m


CPIO(1)             UNIX Programmer's Manual		  CPIO(1)



[1mNAME
     [0mcpio - copy file archives in and out

[1mSYNOPSIS
     cpio -o [0m[ [1macBv [0m]

     [1mcpio -i [0m[ [1mBcdmrtuvfsSb6 [0m] [ patterns ]

     [1mcpio -p [0m[ [1madlmruv [0m] directory

[1mDESCRIPTION
     Cpio -o [0m(copy out) reads the standard input to obtain a list
     of path names and copies those files onto the standard out-
     put together with path name and status information.  Output
     is padded to a 512-byte boundary.

     [1mCpio -i [0m(copy in) extracts files from the standard input
     which is assumed to be the product of a previous [1mcpio -o[0m.
     Only files with names that match _p_a_t_t_e_r_n_s are selected.
     _P_a_t_t_e_r_n_s are given in the name-generating notation of _s_h(1).
     In _p_a_t_t_e_r_n_s, meta-characters [1m?[0m, [1m*[0m, and [1m[[0m...[1m] [0mmatch the slash
     [1m/ [0mcharacter.  Multiple _p_a_t_t_e_r_n_s may be specified and if no
     _p_a_t_t_e_r_n_s are specified, the default for _p_a_t_t_e_r_n_s is [1m* [0m(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 [1mcpio -o[0m.  The owner and
     group of the files will be that of the current user unless
     the user is the super-user, which causes cpio to retain the
     owner and group of the files of the previous [1mcpio -o[0m.

     [1mCpio -p [0m(pass) reads the standard input to obtain a list of
     path names of files that are conditionally created and
     copied into the destination _d_i_r_e_c_t_o_r_y tree based upon the
     options described below.

     The meanings of the available options are:

     [1ma	[0mReset access times of input files after they have been
	copied.
     [1mB	[0mInput/output is to be blocked 5,120 bytes to the record
	(does not apply to the _p_a_s_s option; meaningful only with
	data directed to or from character special files).
     [1md	[0m_D_i_r_e_c_t_o_r_i_e_s are to be created as needed.
     [1mc	[0mWrite _h_e_a_d_e_r information in ASCII character form for por-
	tability. Note that on input, [1mcpio [0mautomatically detects
	in which form the input is given.
     [1mr	[0mInteractively _r_e_n_a_m_e files.  If the user types a null
	line, the file is skipped.
     [1mt	[0mPrint a _t_a_b_l_e _o_f _c_o_n_t_e_n_t_s of the input.  No files are
	created.
     [1mu	[0mCopy _u_n_c_o_n_d_i_t_i_o_n_a_l_l_y (normally, an older file will not



Printed 3/12/93     Revision 1.6 of 05/11/90			1






CPIO(1)             UNIX Programmer's Manual		  CPIO(1)



	replace a newer file with the same name).
     [1mv	[0m_V_e_r_b_o_s_e: causes a list of file names to be printed.  When
	used with the [1mt [0moption, the table of contents looks like
	the output of an [1mls -l [0mcommand (see _l_s(1)).
     [1ml	[0mWhenever possible, link files rather than copying them.
	Usable only with the [1m-p [0moption.
     [1mm	[0mRetain previous file modification time.  This option is
	ineffective on directories that are being copied.
     [1mf	[0mCopy in all files except those in _p_a_t_t_e_r_n_s.
     [1ms	[0mSwap bytes.  Use only with the [1m-i [0moption.
     [1mS	[0mSwap halfwords.  Use only with the [1m-i [0moption.
     [1mb	[0mSwap both bytes and halfwords.	Use only with the [1m-i
	[0moption.
     [1m6	[0mProcess an old (i.e., UNIX System _S_i_x_t_h Edition format)
	file.  Only useful with [1m-i [0m(copy in).

[1mEXAMPLE
	  [0mls | cpio -o >/dev/mt0

     copies the contents of a directory into an archive;

	  cd olddir
	  find[1m . [0m-depth -print | cpio -pdl newdir

     duplicates a directory hierarchy.

     The trivial case ``find[1m . [0m-depth -print | cpio -oB
     >/dev/rmt0'' can be handled more efficiently by:

	  find[1m . [0m-cpio /dev/rmt0

[1mSEE ALSO
     [0mar(1), find(1), cpio(5).

[1mBUGS
     [0mPath 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
     [1m-B [0moption does not work with certain magnetic tape drives.















Printed 3/12/93     Revision 1.6 of 05/11/90			2



[0m