How to Use HTAR

HTAR Execute Line

To run HTAR you must log on to an LC production machine where HTAR has been installed at a time when the storage system (HPSS) is up and available to users. The HTAR execute line has the general form

htar action archive [options] [filelist]

and the specific form

htar -c|t|x|D|K|U|X -f archivename [-BdEhHILmMoOpPSTvVwY] [flist]

where exactly one action and the archivename are always required, while the control options and (except when using -c) the filelist (or flist) can be omitted (and the options can share a hyphen flag with the action for convenience). See the HTAR Options section for details.

Syntax Issues

Traditional TAR is such an old utility that syntax differences have evolved under different versions of the UNIX operating system. Linux at LC offers some different TAR options and uses some of the same options (such as -L) for different purposes. (Refer to the comparison of TAR and HTAR features.) Generally, HTAR syntax follows the more restrictive implementations of TAR. Thus, with HTAR:

  • One "action" (-c|t|x|X|K) is always required, but it need not come first on the HTAR execute line. However, if the first option on the execute line starts without a minus sign but is an HTAR action character, it is treated as if the option did start with a minus sign. For example, the following two command lines are equivalent:
    htar -c -v -f abc.tar *
    htar cv -f abc.tar *
  • The archive specifier -f is always required and it must immediately precede its argument (-f archivename), regardless of where that pair falls on the HTAR execute line.
  • Any HTAR flag character that requires an argument, such as -L pathname, requires that the argument immediately follow the option character, with or without preceding white space.
  • All HTAR options, whatever their order, must precede the first member file name (all options must precede flist or any filters that take the place of flist).
  • Options may share the flag character (-) as long as the other rules above are also followed. Thus, these three combinations
    htar -c -v -f abc.tar *
    htar -cvf abc.tar *
    htar -v -f abc.tar -c *

    are all equivalent, acceptable HTAR execute lines.


Directories. By default, HTAR creates an archive by copying files from the online directory where you run it into a file in your storage (HPSS) home directory, and it extracts files by reversing that process. You must always specify the name of the archive file on which HTAR operates (there is never a default archive). In its reports, HTAR appends slash (/) to each directory name listed.

File Names. Once you name the archive, HTAR calls the corresponding external index file archivename.idx by default and stores it in the same HPSS directory as the archive (by default). HTAR's -I option lets you specify a nondefault name or location for the index file. The HTAR consistency file's name begins with with /var/tmp/uname/HTAR, where uname is your login name on the machine where you run HTAR.

Class of Service (COS). By default, HTAR stores two copies of each archive in HPSS for files up to 256 MB; you can request dual-copy storage of any mission critical HTAR archive, regardless of its size, by using the -Y dualcopy option on HTAR's execute line. NFT's command DIR -h reports the COS for stored files (in output column 3). FTP and HSI also report COS.

Executing HTAR Using Hopper

Hopper is a graphical front end for several file-transfer tools (FTP, NFT, HTAR, HSI) that is installed on all LC production machines. With Hopper you can create HTAR archives by graphically dragging files and directories to the Hopper storage window, and you can just as easily extract contents of HTAR archives. For more details on Hopper, type "man hopper" on an LC host, use Hopper's built-in help package, or visit the Hopper Web pages.