CP(1)                                                       CP(1)

     NAME
          cp - copy files

     SYNOPSIS
          cp fromfile tofile

          cp fromfile ...  todir

          cp -r fromdir ...  todir

     DESCRIPTION
          In the first form, fromfile is any name and tofile is any
          name except an existing directory.

          In the second form, the commands copy one or more fromfiles
          into dir under their original file names, as if by a
          sequence of commands in the first form. For example:

               cp f1 f2 dir

          is equivalent to:

               cp f1 dir/f1;  cp f2 dir/f2

          When cp copies the contents of plain (non-directory) files
          fromfile to tofile, the mode and owner of tofile are pre-
          served if it already exists; otherwise the mode of fromfile
          is used.

          The -r option directs cp to copy recursively the named
          directories fromdir ... to the target directory todir.

     SOURCE
          /appl/cmd/cp.b

     SEE ALSO
          cat(1), sys-stat(2)

     DIAGNOSTICS
          Cp refuses to copy a file onto itself.

     Page 1                       Plan 9             (printed 4/24/24)