Common Uses

Locating wasted space and inactive or fragmented files

   This chapter shows you how to find wasted space, inactive files, fragmented files, etc. on your system using VDM's new SIZE report and the interactive reporting facility.  Often disk space is tied up unnecessarily within files which have been allocated more space than they really require or are not being used.  Waste occurs when the number of blocks allocated to a file is significantly larger than the number of blocks used. To generate the size report you specify /REPORT=SIZE.

Report information
The report displays the disk it is searching then the directory name.  This identifying information is preceded by blank lines.  Then it displays the following information for each selected file:
        NoBackup flag (files marked with an asterisk are set NoBackup)
        file name.type;version
        blocks allocated
        blocks used
        blocks unused (allocated - unused)
        date created
        date modified
        date backed up
        expiration date
        ACL count
        Fragment count

Block fields are shown as 7 digit numbers without commas or signs and are automatically totalled as 8 digit fields.  Dates are shown in the format: dd-mmm-yy (note the 2 digit year). ACL and fragmentation counts are shown as 4 digit numbers without commas or signs.  For all report numeric fields, if the actual number is larger than the maximum, it is displayed as all 9's.

For your convenience, VDM automatically totals all columns containing numbers of blocks as well as showing the total allocated, used and unused figures for the entire drive.

Report sequence
The report is produced in the file-spec sequence.
Associated Qualifiers
You can use the following qualifiers when creating a size report:

    /ALLOCATED            /FILE                /OUTPUT
    /BEFORE                /OWNER            /USED
    /DCL                    /SINCE
    /FLAGS                /STATISTICS
    /FRAGMENTS            /UNUSED
    /MODIFIED or /EXPIRED or /BACKUP or /CREATED    
      Use the command VDM/REPORT=SIZE/UNUSED=n: (note the ":" after the number) to generate a report showing files with n or more unused blocks.

Use the command VDM/REPORT=SIZE/ALLOCATED=n: (note the ":" after the number) to generate a report showing files with n or more allocated blocks.

Use the command VDM/REPORT=SIZE/ALLOCATED=0 to generate a report showing the zero-length files on a drive.

Use the command VDM/REPORT=SIZE/MODIFIED/BEFORE=date to generate a report showing the files on a drive which haven't been written to or modified since the specified date.

Use the command VDM/REPORT=SIZE/EXPIRED/BEFORE=TODAY to generate a report showing files on a drive which are expired.  These files haven't been read or written to in the time limit you set with the OpenVMS commands SET VOLUME/RETENTION and SET FILE/EXPIRATION.

Use the command VDM/REPORT=SIZE/FRAGMENTS=n: (note the ":" after the number) to generate a report showing files on a drive which have n or more fragments.

Use the command VDM/REPORT=SIZE/FLAGS=NOBACKUP to generate a report showing files on a drive which will not be backed up regardless of activity.

Use the command VDM/REPORT=SIZE/BACKUP/BEFORE=date to generate a report showing files on a drive which haven't been backup up since the specified date. This report will also show files that have never been backed up (the backup date is none). To limit this report to only files that have been backed up prior to today use a combination of /BEFORE and /SINCE; VDM/REPORT=SIZE/BACKUP/BEFORE=date/SINCE=01-JAN-1900.

Use the command VDM/REPORT=SIZE/FILE=*.zip to generate a report showing all the zip files on a drive. Since no /disk has been specified VDM will default to the current disk.

Use the command VDM /REPORT=LARGE_FILES /NUM_FILES=50 /FILE=*.DAT /DISK=DKB300: to generate a large files report showing the 50 largest dat files on dkb300.
Displaying file protection information

 This chapter shows you how to locate files with unusual (and possibly dangerous) access by generating reports showing file protection information.

Use the VDM/REPORT=PROTECTION/PROTECTION=protection_code command to generate the file protection report.  The protection report shows you protection for the files which match the criteria you've specified.

Use this report to locate files with potentially troublesome protection such as files which:

    have excessive access such as:
        WORLD write or delete access, /PROTECTION=WORLD:WD
        GROUP write or delete access, /PROTECTION=GROUP:WD

    do not have sufficient access such as:
        lack full SYSTEM access, /PROTECTION=("-",SYSTEM:RWED)
        lack any OWNER access, /PROTECTION=("-",OWNER:RWED)

Specifying selection criteria
You can select one or more files to appear on the report by specifying selection criteria.  If you don't specify any selection criteria, all files will appear on the report.  Normally, you would specify /PROTECTION to search for specific file protection.  You can also specify additional criteria such as /OWNER or /ACE.  For more information on selection criteria, refer to the chapter "Specifying selection criteria".

The protection report will find any file that matches any of the protections you have specified. By default the protection report takes the /MATCH=OR action. For instance /PROTECTION=(WORLD:WD) will find files with world write OR delete or both protection. If you want to find files that match the specified access exactly you need to specify /MATCH=AND. For instance /PROTECTION=(WORLD:WD)/MATCH=AND will find only files with both world write AND delete access.

Report information
The report displays the disk it is searching then the directory name.  The directory information is preceded by blank lines to provide visual separation between each directory  Then it displays the following information for each file:

        owner (UIC, identifier or username)
        file name.type;version
        protection (graphic display of file protection)
        Number of ACE's in ACL (999, blank if zero)


=================================================================
Report Name
 Owner       File-spec                Protection     ACL
Disk: x-disk-x

Directory: [x-directory-x]
x-owner-x  x-filename.type;version-x  x-protection-x  n-ACL-n
x-owner-x  x-filename.type;version-x  x-protection-x  n-ACL-n

Directory: [x-directory-x]
x-owner-x  x-filename.type;version-x  x-protection-x  n-ACL-n
=================================================================

For readability, file protection is shown in following graphic format:

    SYSTEM OWNER GROUP WORLD
    RWED   RWED  R-E-  R---

    R    indicates READ access
    W    indicates WRITE access
    E    indicates EXECUTE access
    D    indicates DELETE access
-        indicates the absence of that class of protection

Report sequence
The report is produced in the file-spec sequence.

Associated Qualifiers
You can use the following qualifiers with this command:
    /ACE
    /ALLOCATED
    /DCL
    /FILE
    /MATCH
    /OUTPUT
    /OWNER
    /PROTECTION
    /STATISTICS
    /TYPE
    /UNUSED
    /USED

Locating files with a particular ACE

  This chapter shows you how to find files which have one or more specified access control entries (ACE) in their access control list (ACL).  OpenVMS provides two methods of access to a file: the traditional UIC/file protection and the more powerful and flexible ACL.  Unfortunately, it is difficult to determine which files have a particular ACE.  The ACE report allows you to quickly determine which files have one or more specified ACE in their ACL.

Use the command:

    VDM/REPORT=ACE/ACE=(IDENTIFIER=identifier,ACCESS=access)

to generate a report showing all files which have one or more specified ACEs.  The ACL report shows you all files on the disk drives you've specified with ACE entries for the identifier you specified.  Use additional qualifiers such as /OWNER or /MATCH to tailor the report to find specific files which need further analysis.

The access portion of the ACE qualifier is specified in the standard OpenVMS way. For example, ACCESS="READ+WRITE+DELETE+EXECUTE" will find any files that give read, write, delete or execute access to the specified identifier. Specifying /MATCH=AND will find only files with read, write, delete and execute access. You may specify NONE or "" to find files which the identifier is denied any access to.

Report information
The report displays the disk it is searching then the directory name.  This identifying information is preceded by blank lines.  Then it displays the following information for each selected file:

        owner (UIC, identifier or username)
        file name.type;version
        protection (graphic display of file protection)
        Number of ACE's in ACL (999, blank if zero)
        ACL (there is one line for each ace)

Report sequence
The report is produced in file-spec sequence.


Associated Qualifiers
You can use the following qualifiers with this command:
    /ACE
    /ALLOCATED
    /BACKUP or /CREATED or /EXPIRED or /MODIFIED
    /BEFORE or /SINCE
    /DCL
    /DISK (one only)
    /FILE
    /FLAGS
    /FRAGMENTS
    /MATCH
    /OUTPUT
    /OWNER
    /PROTECTION
    /STATISTICS
    /TYPE
    /UNUSED
    /USED
    /WIDTH
Generating & deleting directory trees

This chapter shows you how to use VDM to produce reports showing the directory structure (a "directory tree").  OpenVMS allows directories within directories up to eight deep.  Too many levels of sub-directories can degrade system performance.  With the VDM tree report, you can quickly see how many levels there are on each disk.  It provides a clear overview of directories and sub_directories on each disk; an excellent "structure chart" of the disk layout.

Use the DCL procedure VDM_COM:DELTREE to remove an entire directory tree from your system.

Use the command VDM/REPORT=TREE/DISK=(...) to generate a report showing directory trees for one or more drives.  If you enter more than one drive, each starts on a new page.  Use the /LEVEL qualifier to control how many levels of sub-directory are displayed (the default is all).  Use the /INDENT qualifier to control how many spaces each sub-directory is indented.

Report information
The report display the disk it is working on then the root directory "[000000]".  Then it displays all the remaining directories on the disk, indenting each directory so the structure is clearly visible.  Here is a sample directory tree:

    000000                           (device name)
        CLIFFORDA
            EXE
            MRKTNG
        GILBERTS
            HITMAN
                V52
                V60
            RA
        RASSMUSSONA
            CURR
                HITMAN
                VDM
            PERS

Report sequence
The report is produced in the following sequence:

    disk drive (in the order specified by the /DISK qualifier)
    directory

Associated Qualifiers
You can use the following qualifiers with this command:

    /DISK
    /INDENT
    /LEVEL
    /OUTPUT