CP and CCP Commands

HSI Version: 

All [ccp command was added in HSI 4.0.1.3]

Purpose: 

To copy an HPSS-resident file to another HPSS-resident file, or to copy HPSS file(s) and directories to another HPSS directory.

Aliases: 

(for CP): COPY

Command Format: 

{cp | ccp} options sourceFile targetFile


{cp | ccp} options path ... TargetDirectory

CCP Description

The Conditional Copy command will only copy a source file to the target file if:

  1. The destination file does not already exist
  2. OR the destination file is older than the source file

The Conditional Copy command (CCP) is identical in function to the CP command, except as follows:

  • CCP automatically enables the -p (preserve timestamp of source file) and -U (update) options

  • The -f (force) option is not allowed

Options: 

-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.
-c : if specified, the object ACL of the source object is copied to the destination object -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)
-ic : if specified, the Initial Container ACL for the source directory is copied to the target directory
-io : if specified, the Initial Object ACL for the source directory is copied to the target directory
-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 : 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): 

CHACL

MV

FIREWALL

CHACL