COHERENT manpages
This page displays the COHERENT manpage for cpdir [Copy directory hierarchy].
List of available manpages
Index
cpdir -- Command Copy directory hierarchy cpdir [option ... ] dir1 dir2 cpdir copies source directory hierarchy dir1 to target hierarchy dir2, which is created if necessary. Either hierarchy may straddle device boundaries. cpdir preserves as much as possible of the source structure. Files under dir1 go to identically named files under dir2. Links between source files are preserved as links between corresponding target files. Preserved source file attributes include mode, subject to the user's file creation mask. If the user is not the superuser, cpdir cannot preserve the owner, group, and sticky bits in the mode, and the invoking user owns all new files; under the superuser it preserves these as well. In addition, the superuser may ``copy'' special nodes and pipe nodes; cpdir copies only the facility, not the contents. It also preserves real major and minor device numbers of special nodes. If the target file corresponding to a source file exists and is not a directory, cpdir unlinks it before copying. This differs from the action of cp. cpdir recognizes the following options: -a Give a verbose account on one line of the files copied. -d Preserve the last-modified date instead of using the present date. -e Print error message and continue execution after an error. The default action is to exit on any error. -r [n] Descend no more than n levels in the source hierarchy. Contents of dir1 are at level 1. If missing, n defaults to 1. -s name Suppress the copy of file name, which should be the pathname of the file relative to dir1. -t Test only, make no changes. With this option, cpdir prints a report of all errors (-e is implied), all unlinked target files, and other useful information, including a summary of all external links into the target hierarchy that would have been broken had the unlinking actions been executed. -u Update regular files. Copy the source only if it was created or altered more recently than the target file, or if the target does not exist. -v Print a verbose account of its activities. cp prints a file-by-file account of its actions, in addition to the information listed under - t. See Also commands, cp, link(), umask(), unlink()