CGET Command

HSI Version: 



Conditionally retrieves a copy of a file from HPSS to your local file space on the host system only if a local copy does not already exist or the HPSS file is newer than an existing local file.




Command Format: 

cget[] [A] [-B | -b] [-C] [-F on|off] [-h] [-k] [-L path] [N] 

[-O tuple] | -p] [-Q] [-R] [-S] [-T on|off] [-t] [-U | -u]  path ...


-A : enable auto-scheduling for retrievals in order to optimize tape mounts

-B | -b : backup option. Renames any existing local file by appending "~"

-C : purge source file from disk cache after file(s) are copied successfully

-F on off  :  enable or disable the use of HPSS Local File Mover I/O

-k : keep partially transferred file(s) if error(s) are encountered

-h : symlink option. If specified, create local symlink if HPSS symlink. If not set, reads through HPSS symlinks when copying files to local filesystem

-L path : specifies pathname to a file containing a list of file segments to be retrieved.

See the usage notes for a description of the segment syntax.

-N : disable auto-scheduling of retrievals

-O tuple : partial file transfer specification.  See the usage notes below for the format of the "tuple" parameter.  Multiple -O options can be specified for a command. 

-p : preserve timestamp. Attempts to copy the HPSS file's timestamp to the local file. 

-Q : if running as local root user, attempts to preserve the HPSS owner and group on the local file.

-R : recursively copy directories

-S : disable staging of the HPSS file(s); read directly from tape

-T on off   : enable or disable the use of the HPSS Transfer Agent for I/O

-t : retransmit request.  Appends to the local file, using the local files size as the starting offset within the HPSS file.

-U | -u : update option. Only copy HPSS file to the local  file if the HPSS file timestamp is newer



Usage Notes: 

1. This command will overwrite an existing l;ocal file if the HPSS file has a more recent modification

timestamp.  Note that cget with '-t' does not take timestamps into account - it acts as an unconditional 

"get" without checking to see if the HPSS file is newer than the local file.

2. The -R keyword can be used to recursively retrieve directory trees from HPSS, creating local subdirectories as needed. 

3. Auto-scheduling  is a mechanism used on file retrievals to optimize tape mounts, by

organizing file retrievals so that all of the files that are on HPSS disk cache can be retrieved in the foreground, while files that are on tape are staged onto disk in the background.  The staging is organized so that all of the files to be retrieved on a single tape virtual volume are scheduled together, sorted by their position on the volume.

4. see the FTP Compatibility  and Path Names  pages for information on valid characters and renaming files on get and put commands

5. See Using PIPEs for Input/Output  for information on piping files into or out of HPSS

6. See the Restricted TCP Ports and Restricted Hosts section for information on dealing with firewalls.

7. Partial Transfers

HSI can perform partial transfers either by specifying the -t parameter, which is normally used in error recover situations, or by explicitly reading sections of a file, as specified by segment tuples.  Segment tuples are specified by one or more -O options, or by reading a file of tuples from the file specified by the -L parameter.

The syntax for segment tuples is:


Each of these numbers may optionally contain a case-insensitive multiplier suffix of the form "k","kb","m","mb","g","gb","t","tb","p","pb", for kilobytes,megabytes,gigabytes,terabytes,petabytes.

The current position of the source or sink file can be represented by the special string "CP" or "0CP”. 


cget -R someFiles Project

Related Command(s):