CP Command

HSI Version: 

All

Purpose: 

To copy an HPSS-resident file to another HPSS-resident file

Aliases: 

COPY

Command Format: 

{cp | copy} [-B] [-C] [ -f ] [ -h ] [ -i ] [-m method] [-n days]
[ -p ] [ -r | -R ] [-S] [ -x which] SourceDirectory ... TargetDirectory

Options: 

-B : create backup of target file by renaming if it exists (same as "backup=on") (**Deferred for future implementation)
-C : cache purge option. If specified, purge source files from HPSS disk cache after a successful copy. Normally used only when it's expected that files will only be read once (or infrequently), to help optimize HPSS disk cache use.
-f : force removal of the target file instead of renaming (same as "backup=off")
-h : copy symbolic links (default is to read through symlinks)
-i : prompt before copying files (interactive mode)
-m : interhpss copy method ("local" or "server"). Default is "server"
-n : only copy files modified within the specified number of days
-p : preserve time stamp of source file
-R or -r : recursively copy SourceDirectories
-S : disable staging of the source file (attempts to read directly from tape). Users having trouble retrieving files over 25 GB in size may wish to use the -S option for the get or mget commands. The -S option was added to allow users to disable staging files from tape, specifically for this type of situation.
-x : use extended I/O calls. The "which" parameter is "source", "sink",or "both".  This option is normally only used when "firewall" mode is in effect, and designates

whether firewall-type I/O should be used when reading ("source") files, writing files
("sink") or both ("both").  One scenario where this is useful is copying files between
HPSS systems, when one or the other HPSS systems lives behind a firewall.

Keywords: 

DIRn, Class of Service (COS)

Usage Notes: 

In the second form, each file is copied to the subdirectory using the same filename as the original. 

Example: 

Create a copy of an existing file (file1): 

cp file1 file2

Create a copy of an existing file (file.old) in Class of Service 22: 

cp cos=22 file.old file.new

Related Command(s): 

MV

FIREWALL