Listing the Structure of a Directory with DIRLIST

You can use the DIRLIST command to see what the MAINT. top directory contains. DIRLIST is a very useful command because it lets you easily see the big picture of what subdirectories are contained within a directory. A sample format of the DIRLIST command follows:
Read syntax diagramSkip visual syntax diagram dirlist dirid

If you do not specify a directory identifier when entering the DIRLIST command, your top directory is assumed.

Because you accessed MAINT. with a file mode of B, CMS finds the correct directory and performs the DIRLIST command when you just specify the file mode letter. Enter:
dirlist b

Your screen will look like the example shown in Figure 1.

Figure 1. Entering the DIRLIST Command
yourid   DIRLIST  A0  V 319   l=1 Alt=0
Cmd   Fm Directory Name
 _    B  VMSYSU:MAINT.
      -  VMSYSU:MAINT.SAMPLES
 
 
 
 
 
 
 
 
 
 
 
 
 
1= Help       2= Refresh  3= Quit   4= Sort(fm)    5= Sort(dir)   6= Auth
7= Backward   8= Forward  9=       10=            11= Filelist   12= Cursor
 
====>
                                                            X E D I T  1 File

With DIRLIST, directories are listed in a full-screen display similar to the output you receive when you enter the FILELIST or RDRLIST commands.

The first column of the display, labeled Cmd, is where you can enter commands to be processed against any of the directories listed. The Fm column indicates the file mode letter you used to access the directory. The column labeled Directory Name lists the complete name of the directory.

The DIRLIST command lists the directory you specify plus all its subdirectories. DIRLIST can also display only a subset of directories, or minidisks linked to your virtual machine. Listed below are some of the options available for the DIRLIST command. For more information, see z/VM: CMS Commands and Utilities Reference.

ALL
the default for DIRLIST; it lists all the directories in the specified directory structure for which you have some authority. Directories are listed regardless of their attributes, and even if they are not accessed.
ACCESSED
to list only directories that are accessed.
DIRCONTROL
to list only directory control directories
FILECONTROL
to list only file control directories
MDISK
to list the minidisks that you have linked. If this option is used with the ACCESSED option, only the minidisks you have accessed will be listed along with the directories that are listed. When the MDISK option is used with FILECONTROL, DIRCONTROL, or ALL, all of the minidisks you have linked will be listed along with all of the FILECONTROL, DIRCONTROL, or ALL directories that are listed. Examples of using this option will be given in the next section.

If you have authority to subdirectories under another user's top directory, but do not remember their names, you can use the DIRLIST command to display a list of all subdirectories to which you have authority. Use the same command format, except substitute the userid of the other user for the dirid.