![]() |
![]() |
|
|
![]() |
![]() |
Commands Reference HP 3000 Series 9X8LX Computer Systems > Chapter 2 MPE/iX Commands![]() DISKUSE |
|
This command displays disk space usage, in sectors, for one or more directories or a directory tree.
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.) 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:
Figure 2-1 “Hierarchical Directory Structure” 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 “Hierarchical Directory Structure” assume the directory structure shown. For illustrative purposes, the HPPROMPT variable has been set to show the current working directory (HPCWD). For example:
Figure 2-1 Hierarchical Directory Structure
The example shown in Figure 2-2 “DISKUSE Output Format” illustrates the format of the DISKUSE output. In this example, the TREE option is implied by the trailing slash (/). Figure 2-2 DISKUSE Output Format
Each of the columns contains information about the directory.
The plus signs (+) shown in the TREE column of Figure 2-2 “DISKUSE Output Format” 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.
If the directory name parameter is omitted, the CWD is assumed, as seen in the following example:
The next example illustrates the use of the TREE option. Information is reported for the dir_name (d3) and all directories below.
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 “Hierarchical Directory Structure”.
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. Figure 2-3 Using Wildcards with NOTREE Output
Figure 2-4 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. |
![]() |
||
![]() |
![]() |
![]() |
|||||||||
|