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

cp(1) OSS Shell and Utilities Reference Manual
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 ag 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.
e. To copy all files with a name ending in the letter c from the current OSS direc-
tory to Guardian $VOL.SUBVOL, enter:
cp . /*c /G/vol/subvol
The Guardian filenames resulting from this copy are truncated to the first eight
characters. Characters in the OSS filenames that are illegal to the Guardian file
system are skipped during the renaming process. The specified target volume
must exist in the Guardian environment.
f. To copy a Guardian file to an OSS directory, enter:
cp /G/vol/subvol/file /usr/bin
g. To copy the files in an OSS directory named /usr/u/rose to the Guardian volume
/G/vol,enter:
cp -r /usr/u/rose /G/vol
If /usr/u/rose contains file1 (a plain text file) and also rose1 (a subdirectory), the
cp command creates the subvolume rose in /G/vol and copies only the file file1.
The subtree rose1 is not copied. The destination volume must exist in the Guar-
dian environment.
h. To copy all OSS files on remote node node1 to remote node node2,enter:
cp -r -W NOG /E/node1 /E/node2
This command creates the directory tree named node1 within the root directory
of node2.
2106 Hewlett-Packard Company 527188-021