HP 3000 Manuals

DISKUSE [ HP 3000 Series 9X8LX Computer Systems Commands Reference ] MPE/iX 5.0 Documentation


HP 3000 Series 9X8LX Computer Systems Commands Reference

DISKUSE 

This command displays disk space usage, in sectors, for one or more
directories or a directory tree.

Syntax 

DISKUSE [[DIR=]dir_name] [; TREE | NOTREE | USENAME]

Parameters 

dir_name              Directory name for which information is being
                      listed (optional).  The dir_name is assumed to be
                      an MPE syntax name.  HFS-named directories may be
                      shown if dir_name starts with a dot (.)  or a slash
                      (/).  If dir_name is an HFS name and ends in a
                      slash, then all objects at all levels under and
                      including dir_name are reported, unless the NOTREE
                      option is specified.  The use of wildcards is
                      permitted.  If dir_name is omitted, the process'
                      current working directory (CWD) is assumed.

TREE                  Causes all directories below and including dir_name 
                      to be reported.  The dir_name may or may not end in
                      a slash (/), with no error or warning detected.
                      Since the MPE naming convention does not support a
                      trailing slash (/), the TREE option is the only way
                      to report multi-level disk space usage for an
                      MPE-named directory in a single command.

NOTREE                Causes dir_name only to be reported.  If dir_name 
                      is an HFS name and ends in a slash (/), a warning
                      tells you that NOTREE overrides the trailing slash
                      (/).

USENAME               Causes DISKUSE to use dir_name name to decide
                      whether or not to display multiple levels of
                      directories.  If dir_name is an HFS name and ends
                      in a slash (/), then it and all directories under
                      it are shown.  If dir_name does not end in a slash
                      (/), then only dir_name is reported.  The USENAME
                      parameter only applies to HFS-named directories and
                      is ignored for MPE-named directories.  The USENAME
                      parameter is the default.

Operation Notes 

You can use the DISKUSE command to report on disk space, in sectors, for
a directory.  Disk space allocated to directories themselves (including
accounts and MPE groups) is counted as part of the total number of
sectors.  The process' CWD is shown for all relative pathnames.

The number of components in the pathname controls the level of
directories being reported.  If a pathname has four components, for
example, /a/b/c/d, then only directories with four or more components
contribute to the output.  This also applies to the use of wildcard
component names.  For example, /@/@/@/@ only counts directories with at
least four components in their pathname (absolute or relative, depending
on how it was specified).  MPE names follow the same formula:  @.@.@
reports only MPE-named directories one level below MPE groups.  (@.@ is
the same since it is qualified with the logon account name.)

Use 

You must have traverse directory entries (TD) and read directory entries
(RD) permissions to each directory contributing to the reported totals.
TD access is needed to each directory component named in dir_name.
(Refer to the ALTSEC command in this chapter for additional information
on directory permissions.)

Note that the MPE syntax cannot specify a group.account.  MPE syntax only
permits dir.group.acct if dir is a valid MPE name; that is, all uppercase
alphanumeric.  (If group.account were specified, it would be interpreted
as a file called group.account.logon_account.)

Directory errors can occur while DISKUSE is collecting file space
information.  For example, if you lack traverse directory entries (TD)
access to one or more of the lower level directories, an error occurs.

If you specify ;TREE, you will only be able to see directories that you
have TD and RD access to.  DISKUSE stops on the first error encountered.
This may result in no data (other than a header) displayed, or in the
case of wildcard names, some directories are seen (up to the directory
where the error occurred).  Even in the wildcard directory name case,
once an error is encountered, DISKUSE terminates.

There are several ways to see all disk space used on the system:

   *   To show the disk space for every directory on the system, enter:

            DISKUSE / 

   *   To show only the total system disk space in one line, enter:

            DISKUSE /;NOTREE 
            NOTREE option overrides directory name ending in "/". (CIWARN 9041)

       _________________________________________________________________ 

       NOTE  Since the dir_name in the above example ends in a slash, a
             warning is issued to tell you the NOTREE option overrides
             the trailing slash.

       _________________________________________________________________ 

   *   To display disk space used by all directories directly under the
       root, enter:

            DISKUSE /@ 

Examples 

Figure 2-1  illustrates a hierarchical directory structure.  In this
figure, directory names are shown as the character d plus a number (for
example, d0), and file names are shown as the character f plus a number
(for example f1).  All of the examples following Figure 2-1  assume
the directory structure shown.  For illustrative purposes, the HPPROMPT
variable has been set to show the current working directory (HPCWD). For
example:

     :setvar hpprompt "!!hpcwd:" 
     /ACCT/GROUP/d0:
______________________________________________________________________________________
|                                                                                    |
|                                                                                    |
|                                    /ACCT/GROUP/d0  = CWD                           |
|                                           |                                        |
|        -----------------------------------|--------------------------------------- |
|        |               |                        |                        |   |   | |
|        d1              d2                       d3                      f1  f2  f3 |
|                        |                        |                                  |
|          --------------|---------------     ----|--------------                    |
|          |     |   |    |       |     |     |     |   |   |   |                    |
|          d4    f4  f5   d5      d6    f6    d7    f7  f8  f9  f10                  |
|          |              |       |           |                                      |
|       ---|--         ---|  -----|----     --|-----------------------               |
|       |    |         |     |    |   |     |    |    |    |    |    |               |
|       f11  f12       d8    f13  f14 f15   d9   f16  f17  f18  f19  f20             |
|                                                                                    |
|                                                                                    |
|                                                                                    |
|                                                                                    |
______________________________________________________________________________________

          Figure 2-1.  Hierarchical Directory Structure 

The example shown in Figure 2-2  illustrates the format of the DISKUSE
output.  In this example, the TREE option is implied by the trailing
slash (/).
______________________________________________________________________________
|                                                                            |
|                                                                            |
|      /ACCT/GROUP/d0:diskuse ./                                             |
|                SECTORS                                                     |
|            TREE       LEVEL   DIRECTORY (CWD= /ACCT/GROUP/d0)              |
|                       BELOW                                                |
|              64 +         0   ./d1/                                        |
|              96          32   ./d2/d4/                                     |
|              64           0   ./d2/d5/d8/                                  |
|             128          64   ./d2/d5/                                     |
|             112          48   ./d2/d6/                                     |
|             448 +       240   ./d2/                                        |
|              64           0   ./d3/d7/d9/                                  |
|             208         144   ./d3/d7/                                     |
|             336 +       128   ./d3/                                        |
|              48 +         0     (files directly below specified directory) |
|             960         240   ./ (64 +)                                    |
|      /ACCT/GROUP/d0:                                                       |
|                                                                            |
|                                                                            |
______________________________________________________________________________

          Figure 2-2.  DISKUSE Output Format 


NOTE The current working directory (CWD) relative display is shown as part of the header line. If the CWD name is long, it truncates with a dollar sign ($).
Each of the columns contains information about the directory. DIRECTORY (left-justified) Displays the selected directory name, in HFS-format. The directory pathname wraps around to the next line if it is longer than the field. LEVEL BELOW (right-justified) Shows the number of sectors allocated directly to all objects immediately under the named directory. The space used by the listed directory file (container) does not contribute to this number, nor does the space used by the objects under directories under the displayed directory. The sum of the number of sectors reported by a LISTFILE dir_name/@,2;NOTREE equals the number shown under the LEVEL BELOW column. The number in the LEVEL BELOW column is zero if the reported directory is empty. TREE (right-justified) Displays the total number of sectors used by the directory listed. This includes space used by the directory itself, all files immediately under the directory, and space used by all subdirectory entries. The sum of the number of sectors seen in a LISTFILE dir_name,2;TREE equals the total number in the TREE column. The plus signs (+) shown in the TREE column of Figure 2-2 refer to the directories that are one level below the target directory. When added, the sectors shown in this example equal 896. The last entry shows the total number of sectors (960) used by all subdirectories under the target directory (896) plus the sectors used by the target directory itself (64). The next example illustrates the use of the NOTREE option. Only the directory name is displayed. ______________________________________________________ | | | | | /ACCT/GROUP/d0:diskuse /ACCT/GROUP/d0 ;notree | | SECTORS | | TREE LEVEL DIRECTORY | | BELOW | | 960 240 /ACCT/GROUP/d0/ | | /ACCT/GROUP/d0: | | | | | | | ______________________________________________________ If the directory name parameter is omitted, the CWD is assumed, as seen in the following example: _________________________________________________________________ | | | | | /ACCT/GROUP/d0:diskuse | | SECTORS | | TREE LEVEL DIRECTORY (CWD= /ACCT/GROUP/d0) | | BELOW | | 960 240 ./ | | | | | _________________________________________________________________ The next example illustrates the use of the TREE option. Information is reported for the dir_name (d3) and all directories below. _________________________________________________________________ | | | | | /ACCT/GROUP/d0:diskuse ./d3/@ ;tree | | SECTORS | | TREE LEVEL DIRECTORY (CWD= /ACCT/GROUP/d0) | | BELOW | | 64 0 ./d3/d7/d9/ | | 208 + 144 ./d3/d7/ | | 208 ./d3/@ | | /ACCT/GROUP/d0: | | | | | _________________________________________________________________ You can use MPE syntax as shown in the following example (note that the dir_name (MYDIR) is upshifted.) This example is not based on the directory structure shown in Figure 2-1 . ____________________________________________________ | | | | | DISKUSE mydir.group.acct | | | | SECTORS | | TREE LEVEL DIRECTORY | | BELOW | | | | 2100 330 /ACCT/GROUP/MYDIR | | | ____________________________________________________
NOTE The output is presented in HFS syntax, even if the directory name is supplied in MPE syntax. If wildcards were used to specify the directory name in MPE syntax, then the final line of output is the user-supplied directory name (upshifted) in MPE format.
You can use wildcards to see a "horizontal cut" of disk space usage at an arbitrary directory depth. Wildcarding can be used in TREE and NOTREE output, as shown in the following examples. _________________________________________________________________ | | | | | /ACCT/GROUP/d0:diskuse ./@ | | SECTORS | | TREE LEVEL DIRECTORY (CWD= /ACCT/GROUP/d0) | | BELOW | | 64 + 0 ./d1/ | | 448 + 240 ./d2/ | | 336 + 128 ./d3/ | | 848 ./@ | | /ACCT/GROUP/d0: | | | | | | | _________________________________________________________________ Using Wildcards with NOTREE Output _________________________________________________________________ | | | | | /ACCT/GROUP/d0:diskuse ./@/ | | SECTORS | | TREE LEVEL DIRECTORY (CWD= /ACCT/GROUP/d0) | | BELOW | | 64 + 0 ./d1/ | | 96 32 ./d2/d4/ | | 64 0 ./d2/d5/d8/ | | 128 64 ./d2/d5/ | | 112 48 ./d2/d6/ | | 448 + 240 ./d2/ | | 64 0 ./d3/d7/d9/ | | 208 144 ./d3/d7/ | | 336 + 128 ./d3/ | | 848 ./@ | | /ACCT/GROUP/d0: | | | | | | | _________________________________________________________________ Using Wildcards with TREE Output The last line of output contains the directory name and the total number of sectors (under the TREE column). The final TREE number always equals the sum of all other TREE numbers for directories with the same number of components as contained in the user-specified name that are designated with a plus sign (+) in the TREE column. For example, if you specified a pathname with three components, then the sum of the TREE field for all directory names with exactly three components equals the final total value. Related Commands LISTFILE REPORT


MPE/iX 5.0 Documentation