Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
cp(1) OSS Shell and Utilities Reference Manual
• A destination pathname might be transformed into a /G pathname that is quite
different from its original pathname. For example, the OSS filename abcde.fghi
is converted into the /G filename ABCDEFGH. In this example, the copy
operation succeeds but the name of the newly created destination file might
cause confusion if it is not anticipated.
• OSS filenames that are similar to each other might be converted into the same /G
filename when copied to the Guardian file system.
• If a source directory contains more than two levels of directories (the maximum
that the Guardian file system currently supports), the entire source subtree cannot
be copied completely to the Guardian target; only the directories at supported
levels are copied.
Environment Variables
The following environment variables affect the execution of the cp command:
UTILSGE Specifies that HP extensions to the root directory should be omitted
when the initial directory is root (/) and a recursive option (-r or -R)is
used in an OSS shell command. Application programs that test this vari-
able might also honor its settings.
The UTILSGE value can be any of the following:
NOE Omit the /E directory.
NOG Omit the /G directory.
NOG:NOE Omit both the /G and /E directories.
The effect of assigning a value to the UTILSGE environment variable is
the same as specifying the -W NOG or -W NOE flag in the command.
EXAMPLES
a. To copy one file to another, enter:
cp file1 file2
If the file2 file exists (and is writable), its contents are replaced by the contents
of the file1 file.
b. To copy files to a directory, enter:
cp file1 file2 dir1
The directory dir1 must exist.
c. To copy all files in a directory and preserve their modification times, enter:
cp -p dir1/* dir2
d. To copy a directory tree to another directory, enter:
cp -R dir1 dir2
The dir1 directory tree is created in the directory dir2.
2−74 Hewlett-Packard Company 527188-007