GET Command

HSI Version: 

All

Purpose: 

Retrieves a copy of a file from HPSS to your local file space on the host system.

Aliases: 

RECV

Command Format: 

g[et] [-A] [-B | -b] [-C][-c on|off] [-F on|off [-h] [-k] [-L path] [-N] [-o] [-O srcofs:sinkofs:length] [-P | -p] [-Q] [-R | -r] [-S] [-T on|off] [-t] [-U | -u][-X max]
[-Y style]
[path ...] [<<MARKER] 

Options: 

-A : enable auto-scheduling for file retrievals.  This is the default unless auto-scheduling has been disabled.  Auto-scheduling results in optimizing tape mounts and tape positioning for retrieval of files that live on tape.


-B | -b : backup option. Renames any existing local file by appending "~". (This option may not be used with -L,-t, or -O)


-C : cache purge option. If specified, purge files from HPSS disk cache after a successful get. Normally used only when it's expected that files will only be fetched once (or infrequently), to help optimize disk cache use.


-c on | off : enable or disable verification of HPSS checksums that are stored separately from the file data in HPSS. This option overrides both the default compile-time option, and the hsirc setting for enabling/disabling checksums. Checksums are created either by storing files with checksums enabled (see the PUT command), or by using the HASHCREATE command to generate a checksum for an existing HPSS file..


-F on|off :  enables or disables use of the HPSS Local File Mover for file transfers, overriding the cconfiguration option(s).


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


-k: keep partially transferred files if error(s) are encountered. Default is to attempt to delete any partially transferred local file if errors occur.


-L path : pathname of a file containing lists of partial file offsets, in the form specified by -O (see below). Multiple entries per line may be specified. -O option(s), if any, are processed before any -L entries


-N : disable auto-scheduling of retrievals. Default is to schedule retrievals in an optimal way so as to minimize HPSS tape mounts


-O : partial file transfer. "srcofs" is the source file offset, "sinkofs" is the sink file offset, "length" is the transfer length. Missing options use defaults (src: 0, sink: 0, length: entire file). "CP" or "0CP" (case-insensitve) can be used to specify "current position". Multiple -O options may be specified, and are processed in order. Offsets may specified with case-insensitive suffixes "k", "kb",etc.


-P:  reserved for future use


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


-Q: If running as local root user, attempts to preserve the HPSS UID and GID on the local file(s).


-R | -r : recursively fetch directories


-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.


-T on|off : enable or disable the use of the HPSS Transfer Agent for I/O, overriding 
any configuration option(s).

-t : "re-get" option. Restart a previously failed operation. This is equivalent to "-O sizeof(localfile):sizeof(localfile):0". Note: -t may not be used with -O or -L


-U | -u : update option. Only copy file from HPSS if local file timestamp is older


-X max : [4.0.1.2+] set maximum concurrent transfers for this command. This may only be used to reduce, not increase, the value set by the HPSS administrator.


-Y style : [4.0.1.2+] specifies the style of checksum to search for when verifying an existing checksum (-c option). Valid colon-separated, case-insensitive options are: "hsi" (default), "vfs" or "hpsssum". If more than one style of checksum is specified, the precedence order is: 1 - HSI-style, 2-VFS-style, 3-HPSSSUM-style.


MARKER : provides sh-style "here"-document syntax for specifying filenames. Lines following the MARKER, which must be the last token on the line, contain pathname (which may include wildcards). The list is terminated by a line containing MARKER as the first token on the line. 



Keywords: 

BACKUP DIRn

Usage Notes: 

1. If either -O,-L is specified, the offsets apply only to the first file transferred.

2. See  FTP Compatibility and Path Names  for information on valid characters and renaming files on get and put commands

3. See Using PIPEs for Input/Output for information on piping files from HPSS into an operating system utility or to the TTY

Example: 

1. Get an hpss file call "hpss_file_name" to a local file called "local_file_name"
      get local_file_name : hpss_file_name
2. Recursively retrieve all of the files in the current directory that end with .c, and all of the files in the directories "Project1" and "Project2"
      get -R *.c Project1 Project2
3. Get the file "precious_data", verifying the checksum that was previously created by storing it with put -con precious_data
    get -con precious_data
4. Get the file "myHPSSfile.tar.gz" to a local pipeline which uncompresses and untar-s the file.
   get "| gunzip | tar xvf - " : myHPSSfile.tar.gz

Related Command(s): 

FIND, CGET, CPUT, PUT