HSI Reference Manual Chapter 8: Commands, Keywords and Parameters
The following commands and keywords are described in this section. The minimum abbreviation for the command or keyword is shown outside of the square brackets, e.g., for the ADD command, the minimum abbreviation is A, and the command is shown as A[DD]. Keywords are distinguished by the presence of the equals (=) character following their name, e.g., DIR=.


A[DD]
Purpose: Alias for MKDIR command

ADO[PT]
Purpose: Replaces the current set of keyword values with those from the named keyset.
Aliases:
Command Format ADO[PT] [keywords] keyset
Options: -l Adopt local keyset
-h Adopt HPSS keyset
Keywords:
Usage Notes: If the keyset name is a minus sign (-), then the system default keyset is used.
Example: adopt myFavoriteKeyset
Related Command(s): FREE, KEEP, SHOW

BELL
Purpose: Toggle for sending the BEL (\007) character to prompt for input
Aliases:
Command Format: BELL
Options:
Keywords:
Usage Notes: The BEL character is not sent unless STDERR is connected to a terminal. It is only sent when input from the terminal is required, not after every file transfer.
Example: bell
Related Command(s):

CDn
Purpose: Changes working directory DIR0-9.
Aliases:
Command Format: CD[0-9] [keywords] [path]
Options:
Keywords: DIR
Usage Notes:
Example:
Related Command(s): CDLS LCD

CDL[S]
Purpose: Executes the CD command, followed by the LS command to combine the operations of changing to a new directory and listing it into a single command.
Aliases:
Command Format: CDLS [options] [path]
Options: Listing options acdlprsuxCFHORU1
Keywords: DIR
Usage Notes:
Example:
Related Command(s): CD LS LCD LCDLS LLS

CDUP
Purpose: Moves up one node in the current working directory.
Aliases:
Command Format: CDUP[0-9]
Options:
Keywords: DIR
Usage Notes: This command is internally converted into `CD[n]`
Example:
Related Command(s):

CGET
Purpose: 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.
Aliases:
Command Format: CGET [keywords][options] [localfile:]path ...
Options: -R Recurse through subdirectories
-p Preserve time stamps when creating new file
Keywords: BACKUP DIRn
Usage Notes: The -R keyword can be used to recursively retrieve directory trees from HPSS, creating local subdirectories as needed.
Example: cget -R someFiles Project
Related Command(s): FIND, GET CPUT, PUT

CHG[RP]
Purpose: Changes group ownership of HPSS nodes
Aliases:
Command Format: CHGRP [keywords] groupname path ...
Options: -R Recurse through subdirectories
Keywords: DIRn
Usage Notes: The required `groupname' parameter refers to a group name as known to the HPSS system, not to groups on the local host, except by coincidence. The HPSS group list is maintained by the HPSS system administrator.

The -R option can be used to recursively change the group ownership of all nodes within a directory tree.

Example: chgrp -R staff /usr/local/*
Related Command(s): CHMOD, CHOWN

CHM[OD]
Purpose: Changes permissions associated with HPSS nodes
Aliases:
Command Format: CHMOD [keywords] [options] mode path ...
Options: -R Recurse through subdirectories
Keywords: DIRn
Usage Notes: The mode of each named file is changed according to mode, which may be absolute or symbolic. An absolute mode is an octal number constructed from the OR of the following modes:
    0400 read by owner
    0200 write by owner
    0100 execute (search in directory) by owner
    0070 read, write, execute (search) by group
    0007 read, write, execute (search) by others
A symbolic mode has the form:

[who] op permission [op permission] ...

The who part is a combination of the letters u (for user's permissions), g (group) and o (other). The letter a stands for all, or ugo. If who is omitted, the default is a but the setting of the file creation mask (see umask(2)) is taken into account.

Op can be + to add permission to the file's mode, - to take away permission and = to assign permission absolutely (all other bits will be reset).

Permission is any combination of the letters r (read), w (write), x (execute), X (set execute only if file is a directory or some other execute bit is set), s (set owner or group id) and t (save text - sticky). Letters u, g, or o indicate that permission is to be taken from the current mode. Omitting permission is only useful with = to take away all permissions.

The octal-constant value is AND-ed with a mask of 0777; values greater than 0777 are silently truncated.

When the -R option is given, chmod recursively descends its directory arguments setting the mode for each file as described above. When symbolic links are encountered, their mode is not changed and they are not traversed.

Examples: chmod 740 Project/file*
valign=top>chmod u=rwx g+w o=g *.c
Related Command(s): CHGRP, CHOWN

CHO[WN]
Purpose: Change owner for HPSS nodes
Aliases:
Command Format: CHOWN [keywords] [options] ownername path ...
Options: -R Recurse through subdirectories
Keywords: DIRn
Usage Notes: The required parameter `ownername' refers to login names as known to the HPSS system, not to local usernames (except by coincidence). The HPSS list of usernames is maintained by the HPSS system administrator.

The -R option can be used to recursively change the ownership of all nodes within a directory tree.

Example: chown -R nastran /usr/local/Nastran
Related Command(s): CHGRP, CHMOD

CP
Purpose: Copy HPSS file nodes from one location to another
Aliases: COPY
Command Format: CP path1 path2 - copies one file node to another CP path .. dir - copies file node(s) to subdirectory
Options:
Keywords: DIRn
Usage Notes: In the second form, each file is copied to the subdirectory using the same filename as the original.
Example:
Related Command(s): MV

CPUT
Purpose: Conditionally saves a file only if the HPSS file does not exist,
Aliases:
Command Format: CPUT [keywords][options] path ...
Options: -R Recurse through subdirectories
-p Preserve time stamps when creating new file
Keywords: BACKUP DIRn
Usage Notes:

The -R option may be specified to recursively CPUT a directory tree. In this case, HPSS subdirectories are automatically created as needed while traversing the local directory tree.

Example:
Related Command(s): PUT,, CGET , GET

C[OPY]
Purpose: Alias for CP

DEFA[ULT]
Purpose: Alias for SET command

DEL[ETE]
Purpose: Alias for RM command

DIRn=
Purpose: Set working directory 0-9
Keyword Format: DIRn = path
Usage Notes: The "path" parameter may contain wildcards as long as it resolves to a single HPSS directory node name.
Example:
Related Keyword(s):

DU
Purpose: DU gives the number of bytes contained in all files and, recursively, directories within each specified directory or file name. If name is missing, "." is used.
Aliases:
Command Format: du [ -p ] [ -s ] [ -a ] [-b date] [-e date] [-w n] [ name ... ]
Options:
-s if specified, causes only the grand total to be printed.
-a if specified, causes an entry to be printed for each file.
-w if specified, only counts files written within the last 'n' days.
-b if specified, only counts files written since the specified date; the date is of the form "yyyy/mm/dd."
-e if specified, only counts files written before or on the specified date; the date is specified as "yyyy/mm/dd."
If neither -s or -a is specified, an entry is printed for each directory. An error occurs if both -w and (-b or -e) is specified in such a way that it is impossible for any files to qualify.
Keywords:
Usage Notes:
Example:
Related Command(s):

END

Purpose: Terminates execution of HSI
Aliases: EXIT QUIT
Command Format: END
Options:
Keywords:
Usage Notes: A non-zero exit code is returned reflecting the highest severity of error encountered during the session. If no errors occurred, then an exit code of zero is returned.
Example:
Related Command(s):

EX[IT]
Purpose: Alias for END

FI[ND]

Purpose: find recursively descends the directory hierarchy for each pathname in the pathname-list, seeking files that match a boolean (logical) expression written in the primaries given below. In the descriptions, the argument n is used as a decimal integer where +n means more than n, -n means less than n, and n means exactly n.
Keyword Format:
Usage Notes: FIND pathname-list expression

Expression - Any combination of

-name filename True if the filename argument matches the current file name. Wildcard characters are allowed, with or surrounding quotes ("" or '').
-perm onum True if the file permission flags exactly match the octal number onum. Only the lowest 3 octal digits are significant.
-prune Always yields true. Has the side effect of pruning the search tree at the file. That is, if the current path name is a directory, find will not descend into that directory.
-type c True if the type of the file is c, where c is one of:

    d
    f
    l
    for directory,
    for plain file,
    for symbolic link
-user uname True if the file belongs to the user uname. If uname is numeric and does not appear as a login name in the HPSS passwd database, it is taken as a user ID.
-nouser True if the file belongs to a user not in the passwd database.
-group gname True if the file belongs to group gname. If gname is numeric, it is taken as a group ID.
-nogroup True if the file belongs to a group not in the group database.
-size n True if the file is n blocks long (512 bytes per block).
-atime n True if the file has been accessed in n days. Note that the access time of directories in path-name-list is changed by the find command.
-mtime n True if the file has been modified in n days.
-ctime n True if the file has been changed in n days. Changed means either that the file's "st_mtime" field has changed.
-print Always true; the current pathname is printed.
-ls Always true; causes current pathname to be printed together with its associated statistics. These include (respectively) inode number, size in kilo- bytes (1024 bytes), protection mode, user, group, size in bytes, and modification time. If the file is a symbolic link the pathname of the linked-to file is printed preceded by ``->''.
-newer file True if the current file has been modified more recently than the argument file.
-depth Always true; causes descent of the directory hierarchy to be done so that all entries in a directory are acted on before the directory itself.

Example: find . /usr/local/bin -name *.doc -print
Related Keyword(s):

FR[EE]

Purpose: Deletes a saved keyset.
Aliases:
Command Format: FREE [keywords] keyset
Options:
Keywords:
Usage Notes:
Example:
Related Command(s): ADOPT KEEP SHOW

G[ET]
Purpose: Retrieves a copy of a file from HPSS to your local file space on the host system.
Aliases: RECV
Command Format: GET [keywords][options] [localfile:]path ...
Options: -R Recurse through subdirectories
-p Preserve time stamps when creating new file
Keywords: BACKUP DIRn
Usage Notes: The -R keyword can be used to recursively retrieve directory trees from HPSS, creating local subdirectories as needed.
Example: get -R someFiles Project
Related Command(s): FIND, CGET CPUT, PUT

HELP

Purpose: Display brief help information
Aliases:
Command Format: HELP
Options:
Keywords:
Usage Notes:
Example:
Related Command(s):

IN
Purpose: Reads subsequent command input, up to the EOF or until END is encountered, from a local command file.
Aliases:
Command Format: IN localfile
Options:
Keywords:
Usage Notes: The only restriction on commands read from IN files is that no IN command is allowed; i.e., IN files may not be nested. All other command options, including wildcards for both local and HPSS files, are handled exactly the same as for interactive input.
Example:
Related Command(s):

K[EEP]
Purpose: Stores the current set of keyword values from the active keyset into a local file in the ~/.hsikeysets directory.
Aliases:
Command Format: KEEP keyset
Options:
Keywords:
Usage Notes:
Example:
Related Command(s): ADOPT SHOW

LCD
Purpose: Issues a local "change directory" (CD) command on the local host.
Aliases:
Command Format: LCD localpath
Options:
Keywords:
Usage Notes:
Example:
Related Command(s): LCDLS LLS LPWD

LCDL[S]
Purpose: Issues a local `change directory' (CD) command on the local host, followed by a `local list directory' (LLS) command.
Aliases:
Command Format: LCDLS [options] localpath
Options: Local list options. These may differ depending upon the local host's version of UNIX.
Keywords:
Usage Notes: This command combines the common operations of changing to a local directory, then listing its contents, into a single command.
Example: lcdl /usr/local/bin
Related Command(s): LCD LLS LPWD

L[IST]
Purpose: Alias for LS command

LLS

Purpose: List local files by issuing the LS command
Aliases:
Command Format: LLS [list options] [localpath ...]
Options:
Keywords:
Usage Notes:
Example:
Related Command(s): LCD LCDLS LPWD

LN
Purpose: Creates a symbolic link from one HPSS node to another
Aliases:
Command Format: LN [keywords] sourcepath sinkpath
Options:
Keywords: DIRn
Usage Notes: Sourcepath must be an existing node; sinkpath must be a non-existent node.
Example:
Related Command(s):

LOG
Purpose: Create a time stamped history file of all HSI commands and responses
Aliases:
Command Format: LOG [keywords] localpath
Options:
Keywords:
Usage Notes:
Example:
Related Command(s): IN OUT

LPWD

Purpose: Print the current working directory for the local host.
Aliases:
Command Format: LPWD
Options:
Keywords:
Usage Notes:
Example:
Related Command(s): LCD LLS

LS
Purpose: List HPSS nodes
Aliases: LIST
Command Format: LS [keywords] [list options] [paths ...]
Options: -acdlprsuxCFOUHR1
Keywords: DIRn
Usage Notes: List options are available to cause the output to be formatted in a variety of ways. They may be specified individually (e.g., "-C") or as a string (e.g., "-1R"). The current options recognized are shown below. Those marked with | are recognized, but not yet implemented.

a list all files, including hidden files starting with "." |
c use time of last modification for sorting |
d if file is a directory, list its name instead of its contents
l long listing format
p put a slash (/) after each name if the file is a directory
r reverse alpha or age sort, as appropriate
s give size in sectors (4096 bytes)
u use time of last access for sorting instead of last modification
x multicolumn output format, with entries sorted across page
C multicolumn output format, with entries sorted down the columns
F put a slash (/) after directory names, and an asterisk (*) after the name if it is executable
H print headings prior to first line of data
O unordered (no local sorting). Entries are listed in the order encountered in the HPSS directory; this is the fast- est way to list a directory in long format.
R recursively list subdirectories
U print HPSS-specific information (hierarchy, server)
1 one line per node name, even in short mode

Example:
Related Command(s):

LSCOS

Purpose: List hierarchies
Command Format: LSCOS [keywords][hierarchy id]
Options: -lf
Keywords: DIRn

MD
Purpose: Alias for MKDIR

MDEL[ETE]
Purpose: Same as DELETE command, with interactive prompt for each nodename.
Usage Notes: Interactive prompting can be toggled with the PROMPT command.

MGET

Purpose: Same as GET command, with interactive prompt for each nodename.
Usage Notes: Interactive prompting can be toggled with the PROMPT command.

MKD[IR]

Purpose: Create HPSS subdirectories
Aliases: ADD MDCommand
Format: MKDIR [keywords] path ...
Options:
Keywords: DIRn
Usage Notes:
Example: mkdir Source Bin Include Doc
Related Command(s): RMDIR

MO[VE]

Purpose: Alias for MV command

MPUT
Purpose: Same as STORE command, with interactive prompting for each specified path.
Usage Notes: Interactive prompting can be toggled with the PROMPT command.

MV

Purpose: Moves files within the HPSS directory structure.
Aliases: MOVE
Command Format: MV [keywords] path1 path2 - renames path1 to path2
MV [keywords] path ... directory - moves files to subdirectories
Options:
Keywords: DIRn
Usage Notes: In the second form, files are moved to the subdirectory with the same filename as they had in their current directory.
Example: mv *.c Source
Related Command(s): CP

OUT
Purpose: Copies listable output from HSI commands to a local file.
Aliases:
Command Format: OUT localfile
Options:
Keywords:
Usage Notes
Example:
Related Command(s): IN LOG

PROMPT

Purpose: Toggles interactive response request for MPUT, MGET, MDEL commands
Aliases:
Command Format: PROMPT
Options:
Keywords:
Usage Notes: If the interactive terminal is unavailable (for example, within a batch job), a "YES" response is assumed for all commands.
Example:
Related Command(s):

P[UT]

Purpose: Saves or replaces a file. If the HPSS file does not exist, a new file is created; if the HPSS file exists, it is overwritten.
Aliases:
Command Format: Put [keywords][options] path ...
Options: -R Recurse through subdirectories
-p Preserve time stamps when creating new file
Keywords: BACKUP DIRn
Usage Notes: This command always overwrites existing files, in contrast to the CPUT command.

The -R option may be specified to recursively STORE a directory tree. In this case, HPSS subdirectories are automatically created as needed while traversing the local directory tree.

Example:
Related Command(s): CPUT, GET

PWD
Purpose: Prints current working directory within the HPSS directory structure.
Aliases:
Command Format: PWD
Options:
Keywords:
Usage Notes:
Example:
Related Command(s):

Q[UIT]

Purpose: Alias for END

RD

Purpose: Alias for RMDIR

RECV

Purpose: Alias for GET

REM[OVE]
Purpose: Alias for RMDIR

REN[AME]
Purpose: Rename a HPSS node
Aliases:
Command Format: RENAME [keywords] oldpath newpath
Options:
Keywords: DIRn
Usage Notes:
Example:
Related Command(s):

R[EPLACE]
Purpose: Alias for STORE

RM

Purpose: Delete HPSS file nodes
Aliases: DELETE
Command Format: RM [keywords] [options] path ...
Options: -R Recurse through subdirectories
Keywords: DIRn
Usage Notes:

The -R option can be specified to recursively delete subdirectories. This option should be used with care.

Example: rm *.c *.h
Related Command(s):

RMD[IR]
Purpose: Remove HPSS directory nodes
Aliases: RD REMOVE
Command Format: RMDIR [keywords] directory ...
Options:
Keywords: DIRn
Usage Notes: Directory nodes must be empty (all files and subdirectories removed before they can be deleted.
Example:
Related Command(s): RM

S[AVE]

Purpose: Alias for CPUT command

SEND

Purpose: Alias for PUT

SET
Purpose: Sets or lists values for the keywords in the active keyset.
Aliases:
Command Format: SET [keyword = value ...]
Options:
Keywords: BACKUP DIRn
Usage Notes: If the = value is omitted, the current setting for the keyword is displayed

The SET part of the command may be omitted; if a command starts with keyword=value, then HSI assumes a SET command

Example: dir2 = ~/Test/myfiles ("SET" omitted)
Keywords: BACKUP DIRn

SH[OW]

Purpose: Displays your saved keysets or the names of all saved keysets
Aliases:
Command Format: SHOW [keyset ...]
Options:
Keywords:
Usage Notes: Options are:
   -a shows all keysets
   -i shows info (names, dates) for all keysets
Example:
Related Command(s): ADOPT, FREE

STO[RE]
Purpose: Alias for the PUT command.

TOU[CH]
Purpose: Updates last access time for existing files, creates new (0-length) file if file does not exist.
Aliases:
Command Format: TOUCH [keywords][options] path ...
Options: -R Recurse through subdirectories
Keywords: DIRn
Usage Notes: The -R option can be specified to recursively TOUCH all files within a directory tree.
Example: touch dir=sources *.c *.h
Related Command(s):

UM[ASK]
Purpose: This command is used to set the file creation mask, which is used when new files are created. T
Aliases:
Command Format: UMASK permission-mask
Options:
Keywords:
Usage Notes: Setting of this mask to allow "group" and "other" permissions for all nodes created by HPSS is discouraged. Individual nodes can have their permissions altered, if required for file sharing, by using the CHMOD command.

Currently, permission-mask must be an octal value (000-777). Unix-style syntax for owner, goup, and other access (e.g., o+x) will be added in the near future.

Example: umask 022 - allows rwxr-xr-x access to be set for files.
Related Command(s): CHMOD, CHOWN