12/08/88 copy_dir, cpd Syntax: cpd source_dir {target_dir} {entry_type_keys} {-control_args} Function: copies a directory and its subtree to another point in the hierarchy. You can also specify which portions of the subtree be copied and can control the processing of links. Arguments: source_dir is the pathname of a directory to be copied. The star convention is allowed to match directory names. Matching names associated with other storage types are ignored. The source_dir cannot be contained in target_dir. target_dir is the pathname of the copy of the source_dir. The equal convention is allowed. If target_dir is not specified, the copy is placed in the working directory with the entryname of source_dir. If the target_dir does not exist, it is created. The target_dir cannot be contained in source_dir. Control arguments: -acl gives the ACL on the source_dir entry to its copy in target_dir. Although initial ACLs are still copied, they are not used in setting the ACL of the new entries when this control argument is specified. (See "Notes on access provision" below.) -brief, -bf suppresses the printing of warning messages such as "Bit count is inconsistent with current length" and "Current length is not the same as records used." -chase copies the target of a link. The default is not to chase links. Chasing the links eliminates link translation. -force executes the command, when target_dir already exists, without asking you. If -force is not selected, you are queried. -no_link_translation, -nlt copies links with no change. The default is to translate links being copied. If there are references to the source directory in the link pathname of a link being copied, the link pathname is changed to refer to the target directory. -primary, -pri copies only primary names. If -primary is not given, all the names of the selected entries are copied. -replace, -rp deletes the existing contents of target_dir before the copying begins. If target_dir is nonexistent or empty, -replace has no effect. The default is to append the contents of source_dir to the existing contents of target_dir. Notes on entry type keys: Entry type keys control what type of storage system entries in the subtree are copied. If no entry_type_key is specified, all entries are copied. The keys are -branch, -br -directory, -dr -file, -f -link, -lk -multisegment_file, -msf -non_null_link, -nnlk -segment, -sm If one or more entry_type_keys are specified, but not the -directory key, the subtree of source_dir is not walked. Notes on access provision: Status permission is required for source_dir and all the directories in its tree. Status permission is required for the directory containing source_dir. Read access is required on all files under source_dir. Append and modify permission are required for the directory containing target_dir if target_dir does not exist prior to the invocation of copy_dir. Modify and append permission are required on target_dir if it already exists. This command does not force access. If -acl is not supplied, the system default ACLs are added, then the initial ACL for the containing directory is applied (which may change the system-supplied ACL). Initial ACLs are always copied for the current ring of execution. Notes: If target_dir already exists and -force is not specified, you are so informed and asked if processing should continue. If target_dir is contained in source_dir, an appropriate error message is printed and control is returned to command level. If name duplication occurs while appending the source_dir to the target_dir and the name duplication is between directories, you are queried whether processing should continue. If you answer yes, the contents of the directory are copied (appended) but none of the attributes of that directory are copied. If the answer is no, the directory and its subtree is skipped. If name duplication occurs between segments, you are asked whether to delete the existing one in target_dir. If -replace is given or target_dir does not exist, name duplication does not occur. If part of the tree is not copied (by specifying a storage system entry key), problems with link translation may occur. If the link target in the source_dir tree is in the part of the tree not copied, there may be no corresponding entry in the target_dir tree; hence, translation of the link causes the link to become null. If copying a non-empty mailbox requires that the max_length characteristic of the source be applied to the target, then the target max_length value will take on the default value that was given it when created. See also the copy, move, and move_dir commands. ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved