Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

cp(1) OSS Shell and Utilities Reference Manual
HP Extensions
-L Overrides the default behavior of the -R ag so that cp follows symbolic
links.
-W clobber Allows the existing target Guardian le to be overwritten using the date
from the source le.
-W NOG Species that the /G directory should be omitted when the initial direc-
tory is root (/) and a recursive ag (-R or -r) is used. This ag is ignored
when the initial directory is not /, /E,or/E/system or when recursion
does not occur.
-W NOE Species that the /E directory should be omitted when the initial direc-
tory is root (/) and a recursive ag (-R or -r) is used. This ag is ignored
when the initial directory is not root (/) or when recursion does not
occur.
Specify both the -W NOG and -W NOE ags to omit both the /G and /E directories.
DESCRIPTION
The cp command copies a source le or directory to a destination le or directory
In the rst form given in SYNOPSIS, the cp command copies the contents of source_le into
target_le.Iftarget_le exists, its contents are overwritten provided the user has write permis-
sion on target_les parent directory.
In the second form, two or more les are copied to the destination directory.
In the third form, source directories, including all subdirectories and les within them, are copied
to the destination.
A destination directory must exist in order for a source directory or source le to be copied to it.
Appropriate permissions are always required for le creation or overwriting.
If the destination directory exists, the source directory or les are copied into the destination with
their original names.
If the destination exists, and both the source and destination are les, the source le overwrites
the destination le, permissions allowing.
If the destination does not exist and the source is a le, the destination is considered a le, and
the source is copied to it.
If the source and destination are either both directories or both les and they have the same
name, an error occurs and the copy fails.
Use With Access Control Lists (ACLs)
If the le being copied has an ACL, typically the new le created by the cp command retains the |
ACL. However, if the cp command is executed remotely from a system that does not support |
OSS ACLs, then the ACL for the le is not copied to the destination le. If destination leset |
supports OSS ACLs, the destination le might inherit ACL entries from the parent directory of |
the destination le. If the destination leset does not support OSS ACLs, the destination les do |
not have ACLs. For more information about ACLs, see the acl(5) reference page. |
272 Hewlett-Packard Company 527188-007