Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

6.0a;cpf (copy_file), revision 6.0a, 83/04/26
CPF (COPY_FILE) -- Copy a file.
usage:  CPF source_pathname [target_ pathname] [-C|-R] [-CHN] [-F] [-LF] [-LDL]
                                        [-DACL|-SACL] [-SUBS] [-PDT] {CL}


FORMAT

  CPF source_pathname [target_pathname] [options]


  CPF  copies  a file from the source pathname to the target pathname.  CPF only
  copies  files;  see  CPT  (COPY_TREE)  for  copying  directories   and   their
  subordinate objects.


ARGUMENTS

  source_pathname
  (required)         Specify file to be copied. If the source pathname is a link
                     name,  CPF  resolves  the link and copies the file to which
                     the link refers.

  target_pathname
  (optional)         Specify target for copy. If target_pathname is a directory,
                     source_pathname is copied into this directory.  Target must
                     NOT be a link.

                     Default if omitted:  copy 'source_pathname' into current
                                          working directory

  Multiple source/target pairs and pathname wildcarding are permitted.


OPTIONS

  Default options are indicated by "(D)."

  -C           (D)   Create source file at target.    An  error  occurs  if  the
                     target file already exists.

  -R                 Replace target with copy of source.

  -LF                List files copied.

  -LDL               List files deleted as a result of a "replace" (-R).

  -CHN                Use  with -C to change the name of an existing object with
                     the target pathname before the copy is made.  Use  with  -R
                     to  change  the  name  of a target file if it is in use and
                     cannot be deleted.

  -DACL        (D)   Apply the target directory's default ACL for files  copied.
                     In  addition to its own ACL, each directory has two default
                     ACLs, one for its files and another for its subdirectories.
                     Unless you specify -SACL (below), the system assigns to the
                     target file its parent directory's default ACL for files.

  -SACL              Retain the source file's ACL.

  -SUBS              Retain source ACL for objects which belong to subsystems.

  -F                 Force deletion of target object if 'p' rights are present.

  -PDT               Preserve the source file's modification and used times.

  This command uses the command line parser, and so also  accepts  the  standard
  command options listed in HELP CL.


EXAMPLES

  1.  $ cpf /latest/wbak wbak.latest    Copy the file "wbak" from the
      $                                  "/latest" directory to the
                                         current directory, and call it
                                         "wbak.latest".


  2.  $ cpf /latest/com/wbak /com -r    Copy the file "/latest/com/wbak"
      $                                  to the "/com" directory, replacing
                                         the existing "/com/wbak".

  3.  $ cpf /games/space?* -lf          Copy and list all files in the
      (file)  "spacewar" copied.         "/games" directory starting with
      (file)  "spacebunny" copied.       "space"to the working directory.
      (file)  "space_shot" copied.
      $

  4.  $ cpf ?*.pas backup/=.12.07       Copy all files in the working
      $                                  directory with the suffix ".pas"
                                         to the directory "backup",
                                         appending a date.

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