home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / doc / cp.man < prev    next >
Text File  |  1993-06-13  |  6KB  |  199 lines

  1.  
  2.  
  3.  
  4. CP(1L)                                                     CP(1L)
  5.  
  6.  
  7. NAME
  8.        cp - copy files
  9.  
  10. SYNOPSIS
  11.        cp [options] source dest
  12.        cp [options] source... directory
  13.        Options:
  14.        [-abdfilprsuvxPR]    [-S    backup-suffix]    [-V    {num-
  15.        bered,existing,simple}]   [--backup]    [--no-dereference]
  16.        [--force] [--interactive] [--one-file-system] [--preserve]
  17.        [--recursive]  [--update]  [--verbose]   [--suffix=backup-
  18.        suffix]     [--version-control={numbered,existing,simple}]
  19.        [--archive] [--path] [--link]  [--symbolic-link]  [--help]
  20.        [--version]
  21.  
  22. DESCRIPTION
  23.        This  manual page documents the GNU version of cp.  If the
  24.        last argument names an existing directory, cp copies  each
  25.        other  given  file  into a file with the same name in that
  26.        directory.  Otherwise, if only two  files  are  given,  it
  27.        copies  the  first onto the second.  It is an error if the
  28.        last argument is not a directory and more than  two  files
  29.        are given.  By default, it does not copy directories.
  30.  
  31.    OPTIONS
  32.        -a, --archive
  33.               Preserve  as  much as possible of the structure and
  34.               attributes of the original files in the copy.   The
  35.               same as -dpR.
  36.  
  37.        -b, --backup
  38.               Make  backups  of  files that are about to be over-
  39.               written or removed.
  40.  
  41.        -d, --no-dereference
  42.               Copy symbolic links as symbolic links  rather  than
  43.               copying  the files that they point to, and preserve
  44.               hard link relationships between source files in the
  45.               copies.
  46.  
  47.        -f, --force
  48.               Remove existing destination files.
  49.  
  50.        -i, --interactive
  51.               Prompt whether to overwrite existing regular desti-
  52.               nation files.
  53.  
  54.        -l, --link
  55.               Make  hard  links  instead  of   copies   of   non-
  56.               directories.
  57.  
  58.        -P, --path
  59.               Form  the  pathname  of  each  destination  file by
  60.               appending to the target directory a slash  and  the
  61.  
  62.  
  63.  
  64. FSF                     GNU File Utilities                      1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CP(1L)                                                     CP(1L)
  71.  
  72.  
  73.               pathname  of  the  source  file.  The last argument
  74.               given to cp must be the name of an existing  direc-
  75.               tory.   For  example,  the command `cp --path a/b/c
  76.               existing_dir'  copies  the  file  a/b/c  to  exist-
  77.               ing_dir/a/b/c,  creating  any  missing intermediate
  78.               directories.
  79.  
  80.        -p, --preserve
  81.               Preserve the original files' owner, group,  permis-
  82.               sions, and timestamps.
  83.  
  84.        -r     Copy  directories  recursively,  copying  all  non-
  85.               directories as if they were regular files.
  86.  
  87.        -s, --symbolic-link
  88.               Make symbolic  links  instead  of  copies  of  non-
  89.               directories.   All  source  files  must be absolute
  90.               pathnames (starting with `/') unless  the  destina-
  91.               tion  files  are  in  the  current directory.  This
  92.               option produces an error message on systems that do
  93.               not support symbolic links.
  94.  
  95.        -u, --update
  96.               Do  not  copy  a  nondirectory that has an existing
  97.               destination with the  same  or  newer  modification
  98.               time.
  99.  
  100.        -v, --verbose
  101.               Print the name of each file before copying it.
  102.  
  103.        -x, --one-file-system
  104.               Skip  subdirectories that are on different filesys-
  105.               tems from the one that the copy started on.
  106.  
  107.        -R, --recursive
  108.               Copy directories recursively.
  109.  
  110.        --help Print a usage message and exit with a non-zero sta-
  111.               tus.
  112.  
  113.        --version
  114.               Print  version  information  on standard error then
  115.               exit.
  116.  
  117.        -S, --suffix backup-suffix
  118.               The suffix used for making simple backup files  can
  119.               be  set  with  the SIMPLE_BACKUP_SUFFIX environment
  120.               variable, which can be overridden by  this  option.
  121.               If  neither  of those is given, the default is `~',
  122.               as it is in Emacs.
  123.  
  124.        -V, --version-control {numbered,existing,simple}
  125.               The type of backups made can be set with  the  VER-
  126.               SION_CONTROL  environment  variable,  which  can be
  127.  
  128.  
  129.  
  130. FSF                     GNU File Utilities                      2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CP(1L)                                                     CP(1L)
  137.  
  138.  
  139.               overridden by this option.  If  VERSION_CONTROL  is
  140.               not  set  and this option is not given, the default
  141.               backup type is `existing'.  The value of  the  VER-
  142.               SION_CONTROL  environment variable and the argument
  143.               to this option are like  the  GNU  Emacs  `version-
  144.               control'  variable;  they  also  recognize synonyms
  145.               that are more descriptive.  The  valid  values  are
  146.               (unique abbreviations are accepted):
  147.  
  148.               `t' or `numbered'
  149.                      Always make numbered backups.
  150.  
  151.               `nil' or `existing'
  152.                      Make  numbered backups of files that already
  153.                      have them, simple backups of the others.
  154.  
  155.               `never' or `simple'
  156.                      Always make simple backups.
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. FSF                     GNU File Utilities                      3
  197.  
  198.  
  199.