1 :Info: copy_dir: cpd:  1988-12-08  copy_dir, cpd
  2 
  3 Syntax as a command:
  4    cpd source_dir {target_dir} {entry_type_keys} {-control_args}
  5 
  6 
  7 Function:  copies a directory and its subtree to another point in the
  8 hierarchy.  You can also specify which portions of the subtree be
  9 copied and can control the processing of links.
 10 
 11 
 12 Arguments:
 13 source_dir
 14    is the pathname of a directory to be copied.  The star convention is
 15    allowed to match directory names.  Matching names associated with
 16    other storage types are ignored.  The source_dir cannot be contained
 17    in target_dir.
 18 target_dir
 19    is the pathname of the copy of the source_dir.  The equal convention
 20    is allowed.  If target_dir is not specified, the copy is placed in
 21    the working directory with the entryname of source_dir.  If the
 22    target_dir does not exist, it is created.  The target_dir cannot be
 23    contained in source_dir.
 24 
 25 
 26 Control arguments:
 27 -acl
 28    gives the ACL on the source_dir entry to its copy in target_dir.
 29    Although initial ACLs are still copied, they are not used in setting
 30    the ACL of the new entries when this control argument is specified.
 31    (See "Notes on access provision" below.)
 32 -brief, -bf
 33    suppresses the printing of warning messages such as "Bit count is
 34    inconsistent with current length" and "Current length is not the
 35    same as records used."
 36 -chase
 37    copies the target of a link.  The default is not to chase links.
 38    Chasing the links eliminates link translation.
 39 
 40 
 41 -force
 42    executes the command, when target_dir already exists, without asking
 43    you.  If -force is not selected, you are queried.
 44 -no_link_translation, -nlt
 45    copies links with no change.  The default is to translate links
 46    being copied.  If there are references to the source directory in
 47    the link pathname of a link being copied, the link pathname is
 48    changed to refer to the target directory.
 49 
 50 
 51 -primary, -pri
 52    copies only primary names.  If -primary is not given, all the names
 53    of the selected entries are copied.
 54 -replace, -rp
 55    deletes the existing contents of target_dir before the copying
 56    begins.  If target_dir is nonexistent or empty, -replace has no
 57    effect.  The default is to append the contents of source_dir to the
 58    existing contents of target_dir.
 59 
 60 
 61 Notes on entry type keys: Entry type keys control what type of storage
 62 system entries in the subtree are copied.  If no entry_type_key is
 63 specified, all entries are copied.  The keys are
 64    -branch, -br
 65    -directory, -dr
 66    -file, -f
 67    -link, -lk
 68    -multisegment_file, -msf
 69    -non_null_link, -nnlk
 70    -segment, -sm
 71 
 72 If one or more entry_type_keys are specified, but not the -directory
 73 key, the subtree of source_dir is not walked.
 74 
 75 
 76 Notes on access provision: Status permission is required for
 77 source_dir and all the directories in its tree.  Status permission is
 78 required for the directory containing source_dir.  Read access is
 79 required on all files under source_dir.  Append and modify permission
 80 are required for the directory containing target_dir if target_dir
 81 does not exist prior to the invocation of copy_dir.  Modify and append
 82 permission are required on target_dir if it already exists.  This
 83 command does not force access.
 84 
 85 If -acl is not supplied, the system default ACLs are added, then the
 86 initial ACL for the containing directory is applied (which may change
 87 the system-supplied ACL).  Initial ACLs are always copied for the
 88 current ring of execution.
 89 
 90 
 91 Notes:  If target_dir already exists and -force is not specified, you
 92 are so informed and asked if processing should continue.  If target_dir
 93 is contained in source_dir, an appropriate error message is printed and
 94 control is returned to command level.
 95 
 96 If name duplication occurs while appending the source_dir to the
 97 target_dir and the name duplication is between directories, you are
 98 queried whether processing should continue.  If you answer yes, the
 99 contents of the directory are copied (appended) but none of the
100 attributes of that directory are copied.  If the answer is no, the
101 directory and its subtree is skipped.  If name duplication occurs
102 between segments, you are asked whether to delete the existing one in
103 target_dir.
104 
105 
106 If -replace is given or target_dir does not exist, name duplication
107 does not occur.
108 
109 If part of the tree is not copied (by specifying a storage system entry
110 key), problems with link translation may occur.  If the link target in
111 the source_dir tree is in the part of the tree not copied, there may
112 be no corresponding entry in the target_dir tree; hence, translation
113 of the link causes the link to become null.
114 
115 
116 If copying a non-empty mailbox requires that the max_length
117 characteristic of the source be applied to the target, then the target
118 max_length value will take on the default value that was given it when
119 created.
120 
121 See also the copy, move, and move_dir commands.
122 
123 
124 :hcom:
125 
126 
127 
128 /****^  HISTORY COMMENTS:
129   1) change(2020-12-14,GDixon), approve(2021-02-22,MCR10088),
130      audit(2021-05-27,Swenson), install(2021-05-27,MR12.6g-0056):
131       A) Change "Syntax:" to "Syntax as a command:" in command info seg
132          last changed after 1984.
133                                                    END HISTORY COMMENTS */
134 
135 
136