


      CPIO(1)                     (UNIX 5.0)                    CPIO(1)



      NAME
           cpio - copy file archives in and out

      SYNTAX
           cpio -o [ acCBv ]

           cpio -i [ BCcdmrtuvfsSb6R ] [ patterns ]

           cpio -p [ adlmruv ] directory

      DESCRIPTION
           Cpio -o (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.

           Cpio -i (copy in) extracts files from the standard input
           which is assumed to be the product of a previous cpio -o.
           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.

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

           The meanings of the available options are:

           a    Reset access times of input files after they have been
                copied.
           B    Input/output is to be blocked 5,120 bytes to the record
                (override the default 512 bytes per block).  Use only
                with the -i and -o options.
           C    Input/output is to be blocked 10240 bytes to the record
                (override the default 512 bytes per block).  Use only
                with the -i and -o options.
           d    Directories are to be created as needed.
           c    Write header information in ASCII character form for
                portability.
           r    Interactively rename files.  If the user types a null
                line, the file is skipped.
           t    Print a table of contents of the input.  No files are
                created.
           u    Copy unconditionally (normally, an older file will not
                replace a newer file with the same name).
           v    Verbose:  causes a list of file names to be printed.
                When used with the t option, the table of contents



      Page 1                                          (73 A2 02MT REV1)






      CPIO(1)                     (UNIX 5.0)                    CPIO(1)



                looks like the output of an ls -l command (see ls(1)).
           l    Whenever possible, link files rather than copying them.
                Usable only with the -p option.
           H    Make file headers compatible with DEC VAX-11 and PDP-
                11.  Use with cpio -i to read a VAX-11 or PDP-11 cpio
                tape that was not created with -c.
           m    Retain previous file modification time.  This option is
                ineffective on directories that are being copied.
           f    Copy in all files except those in patterns.
           s    Swap bytes.  Use only with the -i option.
           S    Swap halfwords.  Use only with the -i option.
           b    Swap both bytes and halfwords in the data.  Use only
                with the -i option.
           6    Process an old (i.e., UNIX System Sixth Edition format)
                file.  Only useful with -i (copy in).
           R    Interactive replace of newer files.  A "y" response to
                the prompt will replace a newer file with an older one,
                any other response will not.  Has no effect when used
                with the -u option.




































      Page 2                                          (73 A2 02MT REV1)






      CPIO(1)                     (UNIX 5.0)                    CPIO(1)



      EXAMPLES
           The first example below copies the contents of a directory
           into an archive; the second duplicates a directory
           hierarchy:

                ls | cpio -o >/dev/mt0

                cd olddir
                find . -depth -print | cpio -pdl newdir

           The trivial case

                find . -depth -print | cpio -oB >/dev/rmt0

           can be handled more efficiently by:

                find . -cpio /dev/rmt0

      SEE ALSO
           ar(1), find(1), cpio(4).

      NOTES
           When transferring files between a Bull-SPS9 and a machine
           with different byte ordering (VAX, PDP-11, Zilog Z8000), use
           the -c compatibility option.

      BUGS
           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.
























      Page 3                                          (73 A2 02MT REV1)



