Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cpio(C) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(CP)

find(C)

cpio(F)



     CPIO(C)                  XENIX System V                   CPIO(C)



     Name
          cpio - Copies file archives in and out.

     Syntax
          cpio -o [ acBv ]

          cpio -i [ Bcdmrtuv ] [ patterns ]

          cpio -p [ adlmruv ] directory

     Description
          cpio -o (copy out) reads the standard input to obtain a list
          of pathnames and copies those files onto the standard output
          together with pathname and status information.

          cpio -i (copy in) extracts from the standard input (which is
          assumed to be the product of a previous cpio -o) the names
          of files selected by zero or more patterns given in the
          name-generating notation of sh(C).  In patterns, the special
          characters ?, *, and [...] match the slash ( / ) character.
          The default for patterns is * (i.e., select all files).

          Remember to escape special characters to prevent expansion
          by the shell.

          cpio -p (pass) copies out and in during a single operation.
          Destination pathnames are interpreted relative to the named
          directory.

          The meanings of the available options are:

          -a     Resets access times of input files after they have
                 been copied.

          -B     Blocks input/output 5,120 bytes to the record (does
                 not apply to the pass option; meaningful only with
                 data directed to or from raw devices).

          -d     Directories are created as needed.

          -c     Writes header information in ASCII character form for
                 portability.

          -r     Interactively renames files.  If the user types a
                 null line, the file is skipped.

          -t     Prints a table of contents of the input.  No files
                 are created.

          -u     Copies unconditionally (normally an older file will
                 not replace a newer file with the same name).




     Page 1                                           (printed 8/7/87)





     CPIO(C)                  XENIX System V                   CPIO(C)



          -v     Verbose: causes a list of filenames to be printed.
                 When used with the -t option, the table of contents
                 looks like the output of an ls -l command (see
                 ls(C)).

          -l     Whenever possible, links files rather than copying
                 them.  Usable only with the -p option.

          -m     Retains previous file modification time.  This option
                 is ineffective on directories that are being copied.

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

               ls | cpio -o >/dev/fd

               cd olddir
               find . -print | cpio -pdl newdir

          Or:

               find . -print | cpio -oB >/dev/rfd

     See Also
          ar(CP), find(C), cpio(F)

     Notes
          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 can copy special files.






















     Page 2                                           (printed 8/7/87)



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