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 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 With Access Control Lists (ACLs)
If the file being copied has an ACL, typically the new file 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 file is not copied to the destination file. If destination fileset |
supports OSS ACLs, the destination file might inherit ACL entries from the parent directory of |
the destination file. If the destination fileset does not support OSS ACLs, the destination files do |
not have ACLs. For more information about ACLs, see the acl(5) reference page. |
2−72 Hewlett-Packard Company 527188-007