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

User Commands (c) cp(1)
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 on Guardian Objects
Specify Guardian les with the /G pathname convention.
Only unstructured Guardian les are supported. If both the source and destination are Guardian
les, the le attributes specic to Guardian (such as extent sizes, le code, and le type) are
preserved. Thus if a type 101 EDIT Guardian le is copied within the Guardian volume, the tar-
get le is also a type 101 EDIT le, with all the line number information preserved. In addition,
if the -p ag is specied, other Guardian le attributes (such as user ID, le security, and times-
tamps) are preserved in the same manner they are preserved with the TACL command FUP DUP.
If you are copying a Guardian le to the OSS le hierarchy, only the content of the Guardian le
is copied: the Guardian le attributes are not preserved. Likewise, if you are copying an OSS
le to the Guardian le hierarchy, the target le is created as an unstructured Guardian le. Thus
if you copy a Guardian type 101 EDIT le to the OSS le hierarchy and then copy it back to the
Guardian le hierarchy, it will no longer be a Guardian type 101 EDIT le.
527188-003 Hewlett-Packard Company 269