Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

cp(1) OSS Shell and Utilities Reference Manual
NAME
cp - Copies les
SYNOPSIS
cp [-p][-W clobber] source_le target_le
cp [-p][-W clobber] source_le ... destination_directory
cp [-fLip][-r | -R][-W clobber][-W NOG ][-W NOE ][source_le | source_directory]
... destination_directory
FLAGS
-f Tries to unlink the destination le and proceed if a le descriptor for a
destination le cannot be obtained.
-L Forces cp to follow symbolic links; useful with the -R ag, which does
not follow symbolic links by default.
-i Requests conrmation when the copy operation requires a destination
le to be overwritten by a source le. An answer beginning with y, or the
locales equivalent of y, causes the cp command to overwrite the desti-
nation le and continue. Any other answer prevents overwriting of the
le.
-p Preserves for the copy the modication time, access time, le mode, user
ID, and group ID of the source, as allowed by permissions. If the user ID
and group ID cannot be preserved, no error message is displayed and the
exit value is not altered. If the original is set-user ID or set-group ID,
and either the user ID or the group ID cannot be preserved, the set-user-
ID and set-group-ID bits are not preserved in the copys permissions.
The -p ag cannot preserve owner ID or group ID information when
copying a le to a remote system. The resulting le is always owned by
the super ID.
-r Copies the source directory and all of the subdirectories within it. This
ag is identical to the -R ag except that special les are not treated
differently from regular les (that is, -r follows symbolic links).
If you are using the -r ag to copy the contents of one directory to
another, and if the source directory contains subdirectories that do not
exist in the destination directory, the subdirectories are created. Created
directories have the same mode as the corresponding source directory,
unmodied by the processs le mode creation mask (umask).
This ag has been proposed for obsolescence in a future revision of the
Single UNIX standard. Use the -R ag instead to ensure portability.
-R Copies the source directory and all of the subdirectories within it. Spe-
cial le types, such as symbolic links and block and character devices,
are re-created instead of copied.
If you are using the -R ag to copy the contents of one directory to
another, and if the source directory contains subdirectories that do not
exist in the destination directory, the subdirectories are created. Created
directories have the same mode as the corresponding source directory,
unmodied by the processs le mode creation mask (umask).
268 Hewlett-Packard Company 527188-003