Hamilton LaboratoriesHamilton C shell 2012User guideExternal utilities


Oregon Coast

Previous | Next

        Copy Files or Directories

Usage:  cp [-cfilmsh-] source1 [ source2 ... ] destination

   cp can copy both files and directories.  If the destination is
   an existing directory, the source object(s) will be copied into
   that directory.  If more than one source object is specified,
   the destination must be a directory, but it need not already

   If a destination file already exists, it will be overwritten;
   this is not considered an error and no diagnostic message is

   By default, security descriptors and access control lists are not
   copied from source to destination.  This is in keeping with the
   Windows convention that security is generally inherited through
   the directory structure.


  -c    Continue even if errors are encountered attempting to
        process some input files or directories.
  -f    Force read-only files to be overwritten.
  -i    Interactive:  Ask before copying each object on the
        command line.
  -l    Logging is on:  Display the name of each file or directory
        as it's copied.
  -m    Merge sub-directories of same name in source and destination.
  -s    Simple copy.  (Default.)  Do not copy security descriptors
        and access control lists.
  +s    Copy security descriptors and access lists.  Under Windows 9x
        or if the destination filesystem does not support ACLs,
        that's not possible and the security information will be
        lost. This is not considered an error and no diagnostic message
        is given.

  -h    Help (this screen.)
  --    End of options.  (Useful if filenames start with "-".)

Previous | Next