Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
User Commands (c) cp(1)
HP Extensions
-L Overrides the default behavior of the -R flag so that cp follows symbolic
links.
-W clobber Allows the existing target Guardian file to be overwritten using the date
from the source file.
-W NOG Specifies that the /G directory should be omitted when the initial direc-
tory is root (/) and a recursive flag (-R or -r) is used. This flag is ignored
when the initial directory is not /, /E,or/E/system or when recursion
does not occur.
-W NOE Specifies that the /E directory should be omitted when the initial direc-
tory is root (/) and a recursive flag (-R or -r) is used. This flag is ignored
when the initial directory is not root (/) or when recursion does not
occur.
Specify both the -W NOG and -W NOE flags to omit both the /G and /E directories.
DESCRIPTION
The cp command copies a source file or directory to a destination file or directory
In the first form given in SYNOPSIS, the cp command copies the contents of source_file into
target_file.Iftarget_file exists, its contents are overwritten provided the user has write permis-
sion on target_file’s parent directory.
In the second form, two or more files are copied to the destination directory.
In the third form, source directories, including all subdirectories and files within them, are copied
to the destination.
A destination directory must exist in order for a source directory or source file to be copied to it.
Appropriate permissions are always required for file creation or overwriting.
If the destination directory exists, the source directory or files are copied into the destination with
their original names.
If the destination exists, and both the source and destination are files, the source file overwrites
the destination file, permissions allowing.
If the destination does not exist and the source is a file, the destination is considered a file, and
the source is copied to it.
If the source and destination are either both directories or both files and they have the same
name, an error occurs and the copy fails.
Use on Guardian Objects
Specify Guardian files with the /G pathname convention.
Only unstructured Guardian files are supported. If both the source and destination are Guardian
files, the file attributes specific to Guardian (such as extent sizes, file code, and file type) are
preserved. Thus if a type 101 EDIT Guardian file is copied within the Guardian volume, the tar-
get file is also a type 101 EDIT file, with all the line number information preserved. In addition,
if the -p flag is specified, other Guardian file attributes (such as user ID, file 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 file to the OSS file hierarchy, only the content of the Guardian file
is copied: the Guardian file attributes are not preserved. Likewise, if you are copying an OSS
file to the Guardian file hierarchy, the target file is created as an unstructured Guardian file. Thus
if you copy a Guardian type 101 EDIT file to the OSS file hierarchy and then copy it back to the
Guardian file hierarchy, it will no longer be a Guardian type 101 EDIT file.
527188-003 Hewlett-Packard Company 2−69