MPE/iX Shell and Utilities Reference Manual, Vol 1

cp(1) MPE/iX Shell and Utilities cp(1)
NAME
cp — copy files
SYNOPSIS
cp [–cfimp] file1 file2
cp [–fimp] file ... directory
cp –R [–fimp] source... directory
cp –r [–fimp] source... directory
DESCRIPTION
Note: The
MPE/iX implementation of this utility does not function exactly as this man page
describes. For details, see the MPE/iX NOTES section at the end of this man page.
cp copies files to a target named by the last argument on its command line. If the target is an
existing file, cp overwrites it; if it does not exist, cp creates it. If the target file already exists
and does not have write permission, cp denies access and continues with the next copy.
If you specify more than two path names, the last path name (that is, the target) must be a
directory. If the target is a directory, cp copies the sources into that directory with names
given by the final component of the source path name.
Options
cp accepts the following options:
–f attempts to replace files which do not have write permission.
–i asks you if you want to overwrite an existing file, whether or not the file is read-only.
–m sets the modify and access time of each destination file to that of the corresponding
source file. Normally, cp sets the modification time of the destination file to the
present.
–p preserves the modify and access times (like the –m option); in addition, it preserves
file mode, owner, and group owner, if possible.
–R clones the source trees. cp copies all the files and subdirectories specified by
source.... into directory , making careful arrangements to duplicate special files (
FIFO,
block special, character special).
–r clones the source trees, but makes no allowances for special files (FIFO, block special,
character special). Consequently, cp attempts to read from a device rather than
duplicate the special file. This is similar to, but less useful than, the preferred –R.
1-128 Commands and Utilities