|
|
coherent
cpdir Command cpdir
Copy directory hierarchy
ccppddiirr [_o_p_t_i_o_n ... ] _d_i_r_1 _d_i_r_2
cpdir copies source directory hierarchy dir1 to target hierarchy
dir2, which is created if necessary. Either hierarchy may strad-
dle 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 su-
peruser 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:
-aa Give a verbose account on one line of the files copied.
-dd Preserve the last-modified date instead of using the present
date.
-ee Print error message and continue execution after an error.
The default action is to exit on any error.
-rr [_n]
Descend no more than n levels in the source hierarchy. Con-
tents of dir1 are at level 1. If missing, n defaults to 1.
-ss _n_a_m_e
Suppress the copy of file name, which should be the pathname
of the file relative to dir1.
-tt 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.
-uu 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.
-vv Print a verbose account of its activities. cp prints a
file-by-file account of its actions, in addition to the in-
COHERENT Lexicon Page 1
cpdir Command cpdir
formation listed under -t.
***** See Also *****
cp, commands, link(), umask(), unlink()
COHERENT Lexicon Page 2
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.