Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

find(1)

ls(1)

cpio(4)



     cpio(1)                                                   cpio(1)



     NAME
          cpio - copy file archives in and out

     SYNOPSIS
          cpio -o[acBv] [

          cpio -i[BcdmrtuvfsSb6] [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 pathname and status information.
          Output is padded to a 512-byte boundary.

          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 flag options described below.  The permissions of
          the files will be those of the previous cpio -o.  The owner
          and group of the files will be that of the current user
          unless the user is super-user, which causes cpio to retain
          the owner and group of the files of the previous cpio -o.

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

          cpio does not follow symbolic links.

          The meanings of the available flag 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
             (does not apply to the pass flag option; meaningful only
             with data directed to or from /dev/risk/68d???).
          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.



     Page 1                                        (last mod. 1/16/87)





     cpio(1)                                                   cpio(1)



          u  Copy unconditionally (normally, an older file will not
             replace a newer file with the same name).
          v  verbose: causes a list of filenames to be printed.  When
             used with the t flag option, the table of contents 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 flag option.
          m  Retain previous file modification time.  This flag 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 flag option.
          S  Swap halfwords.  Use only with the -i flag option.
          b  Swap both bytes and halfwords.  Use only with the -i flag
             option.
          6  Process an old (i.e., UNIX® System Sixth Edition format)
             file.  Only useful with -i (copy in).

     EXAMPLES
               ls | cpio -o >/dev/risk/68d050

          copies the contents of a directory into an archive;

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

          duplicates a directory hierarchy.

          The simple case find . -depth -print | cpio -oB
          >/dev/risk/68d050 may be handled more efficiently by:

               find . -cpio /dev/risk/68d050

     FILES
          /bin/cpio

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

     BUGS
          Pathnames 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 may copy special files.









     Page 2                                        (last mod. 1/16/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026