home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / PAX20.ZIP / CPIO.MAN < prev    next >
Text File  |  1990-11-12  |  6KB  |  166 lines

  1. NAME
  2.      cpio - copy file archives in and out
  3.  
  4. SYNOPSIS
  5.      cpio -o[Bacv]
  6.      cpio -i[Bcdfmrtuv] [pattern...]
  7.      cpio -p[adlmruv] directory
  8.  
  9. DESCRIPTION
  10.      The cpio utility produces and reads files in the format
  11.      specified by the cpio Archive/Interchange File Format speci-
  12.      fied in IEEE Std. 1003.1-1988.
  13.  
  14.      The cpio -i (copy in) utility extracts files from the stan-
  15.      dard input, which is assumed to be the product of a previous
  16.      cpio -o . Only files with names that match patterns are
  17.      selected.  Multiple patterns may be specified and if no pat-
  18.      terns are specified, the default for patterns is  selecting
  19.      all files.  The extracted files are conditionally created
  20.      and copied into the current directory, and possibly any lev-
  21.      els below, based upon the options described below and the
  22.      permissions of the files will be those of the previous cpio
  23.      -o . The owner and group of the files will be that of the
  24.      current user unless the user has appropriate privileges,
  25.      which causes cpio to retains the owner and group of the
  26.      files of the previous cpio -o .
  27.  
  28.      The cpio -p (pass) utility reads the standard input to
  29.      obtain a list of path names of files that are conditionally
  30.      created and copied into the destination directory based upon
  31.      the options described below.
  32.  
  33.      If an error is detected, the cause is reported and the cpio
  34.      utility will continue to copy other files.  cpio will skip
  35.      over any unrecognized files which it encounters in the
  36.      archive.
  37.  
  38.      The following restrictions apply to the cpio utility:
  39.  
  40.      1 Pathnames are restricted to 256 characters.
  41.  
  42.      2 Appropriate privileges are required to copy special files.
  43.  
  44.      3 Blocks are reported in 512-byte quantities.
  45.  
  46.      Options
  47.      The following options are available:
  48.  
  49.      -B   Input/output is to be blocked 5120 bytes to the record.
  50.           Can only be used with cpio -o or cpio -i for data that
  51.           is directed to or from character special files.
  52.  
  53.      -a   Reset access times of input files after they have been
  54.           copied.  When the -l option is also specified, the
  55.           linked files do not have their access times reset.  Can
  56.           only be used with cpio -o or cpio -i .
  57.  
  58.      -c   Write header information in ASCII character for for
  59.           portability.  Can only be used with cpio -i or cpio -o
  60.           . Note that this option should always be used to write
  61.           portable files.
  62.  
  63.      -d   Creates directories as needed.  Can only be used with
  64.           cpio -i or cpio -p .
  65.  
  66.      -f   Copy in all files except those in patterns . Can only
  67.           be used with cpio -i .
  68.  
  69.      -l   Whenever possible, link files rather than copying them.
  70.           Can only be used with cpio -p .
  71.  
  72.      -m   Retain previous modification times.  This option is
  73.           ineffective on directories that are being copied.  Can
  74.           only be used with cpio -i or cpio -p .
  75.  
  76.      -r   Interactively rename files.  The user is asked whether
  77.           to rename pattern each invocation.  Read and write per-
  78.           missions for /dev/tty are required for this option.  If
  79.           the user types a null line, the file is skipped.
  80.           Should only be used with cpio -i or cpio -o .
  81.  
  82.      -t   Print a table of contents of the input.  No files are
  83.           created.  Can only be used with cpio -i .
  84.  
  85.      -u   Copy files unconditionally; usually an older file will
  86.           not replace a new file with the same name.  Can only be
  87.           used with cpio -i or cpio -p .
  88.  
  89.      -v   Verbose: cause the names of the affected files to be
  90.           printed.  Can only be used with cpio -i . Provides a
  91.           detailed listing when used with the -t option.
  92.  
  93.      Operands
  94.      The following operands are available:
  95.  
  96.      patterns  Simple regular expressions given in the name-
  97.                generating notation of the shell.
  98.  
  99.      directory The destination directory.
  100.  
  101.      Exit Status
  102.      The cpio utility exits with one of the following values:
  103.  
  104.      0    All input files were copied.
  105.  
  106.      2    The utility encountered errors in copying or accessing
  107.           files or directories.  An error will be reported for
  108.           nonexistent files or directories, or permissions that
  109.           do not allow the user to access the source or target
  110.           files.
  111.  
  112.  
  113.      It is important to use the -depth option of the find utility
  114.      to generate pathnames for cpio . This eliminates problems
  115.      cpio could have trying to create files under read-only
  116.      directories.
  117.  
  118.      The following command:
  119.           ls | cpio -o > ../newfile
  120.      copies out the files listed by the ls utility and redirects
  121.      them to the file newfile .
  122.  
  123.      The following command:
  124.           cat newfile | cpio -id "memo/al" "memo/b*"
  125.      uses the output file newfile from the cpio -o utility, takes
  126.      those files that match the patterns memo/al and memo/b* ,
  127.      creates the directories below the current directory, and
  128.      places the files in the appropriate directories.
  129.  
  130.      The command
  131.           find . -depth -print | cpio -pdlmv newdir
  132.      takes the file names piped to it from the find utility and
  133.      copies or links those files to another directory named
  134.      newdir , while retaining the modification time.
  135.  
  136. FILES
  137.      /dev/tty  used to prompt the user for information when the
  138.                -i or -r options are specified.
  139.  
  140. SEE ALSO
  141.      find(1), pax(1), tar(1), cpio(5), tar(5)
  142.  
  143. COPYRIGHT
  144.      Copyright (c) 1989 Mark H. Colburn.
  145.      All rights reserved.
  146.  
  147.      Redistribution and use in source and binary forms are per-
  148.      mitted provided that the above copyright notice is dupli-
  149.      cated in all such forms and that any documentation,
  150.      advertising materials, and other materials related to such
  151.      distribution and use acknowledge that the software was
  152.      developed by Mark H. Colburn.
  153.  
  154.      THE SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS
  155.      OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE
  156.      IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PAR-
  157.      TICULAR PURPOSE.
  158.  
  159. AUTHOR
  160.      Mark H. Colburn
  161.      Minnetech Consulting, Inc.
  162.      3232 Aquila Lane
  163.      St. Louis Park, MN 55426
  164.  
  165.      mark@Minnetech.MN.ORG
  166.