LS Command

HSI Version: 

All

Purpose: 

List HPSS nodes 

Aliases: 

LIST, DIR

Command Format: 

{ls | l[ist] | dir} [options] [path ...]

Options: 

-a : list all entries, including "hidden" files whose names begin with "."
-c : use time of last modification for sorting (deferred)
-d : if file is a dir, list its name instead of its contents
-l : (letter "ell") long list format
-p : put a slash after each name if the file is a directory (deferred)
-r : reverse alpha or age sort order, as appropriate (deferred)
-s : display size as well as name if -1 (numeral 1) option used
-u : use time of last access for sorting instead of last modification (deferred)
-x : multicolumn output format, with entries sorted across page 
-A : print annotation info
-C : multicolumn output format, with entries sorted down the columns
-D : (version 3.4.3 and beyond) displays the full date/time stamp

-F : puts a / after directory filenames, or * if executable (deferred)
-H : print headings on long listings
-O : print unordered "-l" or "-1" format listings
-P : print one line per node with volume/position/VSN list/COS/file family/subsystem  info 
-R : recursively list directories

-S : (3.4.3 and beyond) display sizes in the form XX.Y sfx, where sfx is "B","KB","MB","GB","TB","PB" or "XB", where 1K = 1000.  Enables "-l" option.

-T : "type" where type is one of w,r,c or m. This allows the user to specify which HPSS time value is displayed when one of the "long list" options (e.g. "ls -l") is used. The letters stand for:

    w - last write time 
    r - last read time
    c - file creation time
    m - time of last modification (default)

-U : print HPSS-specific information
-V : print volume info for 1st tape level. Enables "-l" option
-X : print extended volume info (for all levels). Enables "-l" option.
-1 : (numeral 1) forces one name-per-line list 

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

See the examples below for descriptions of the fields for the -P, -V, and -X options.

Examples: 

  1. Simple long listing "ls -l" command.
    This produces normal Un*x-style output
    
    ls -l test.tar.bz2
    -rw-r--r--   1 gleicher  14 437276618 May 28 2003 test.tar.bz2
    
    
  2. List the information for the first tape level in the hierarchy in which the
    file resides:
    ls -V somefile

    produces output similar to this:

    
     ls -V test.tar.bz2
    -rw-r--r--   1 gleicher  14         6002       legacy TAPE     437276618 May 28  2003 test.tar.bz2
    Storage   VV   Stripe  
     Level   Count  Width  Bytes at Level
    ----------------------------------------------------------------------------
     1 (tape)   1       1  437276618
      VV[ 0]:   Object ID: b730e850-a89f-11e0-98d6-10005afa75bf
                ServerDep: 6a61f9a2-fd36-11d0-93cb-10005afa75bf
      Pos: 7323   PV List: X3086300  
                                         
  3. List file tape/position information on a single line.

    
    ls -P test.tar.bz2
    FILE /home/gleicher/test.tar.bz2 437276618  437276618  7323+0 X3086300
             6002 0 1 05/28/2003 21:03:13 07/12/2011 09:53:21
    
                                       
    This is sometimes used for sorting files by tape/position.
    Fields in the listing are separated by tabs.

    The fields are as follows:

    1. type (FILE, DIRECTORY,SYMLINK,JUNCTION)
    2. object name
    3. size
    4. bytes at 1st tape level
    5. tape position+offset (offset=0:not in aggregate or first file in aggregate)
    6. first or only tape VV cartridge(s) for file
    7. class of service
    8. file family ID
    9. subsystem ID
    10. create time
    11. modification time

Related Command(s):