Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cpf — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

7.0;cpf (copy_file), revision 7.0, 87/03/20
CPF (COPY_FILE) -- Copy a file.
usage:  CPF source_pathname [target_ pathname] [-C|-R] [-CHN] [-F] [-LF] [-LDL]
                                        [-DU] [-DACL|-SACL] [-SUBS|-NSUBS]
                                        [-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 1) you specify -SACL, or 2) the file  belongs  to  a
                     protected  subsystem (see -SUBS), the system assigns to the
                     target file its parent directory's default ACL for files.

  -SACL              Retain the source file's ACL.

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

  -NSUBS             Apply the target directory's default ACL for objects  which
                     belong to subsystems.

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

  -DU                 Delete  when unlocked.  This option is useful with -R.  If
                     the object to be replaced is locked when  CPF  is  invoked,
                     the  replace operation will be performed when the object is
                     unlocked.

  -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