FDEL (Fast File Delete) was written to delete files from a directory
that contains a very large number of files (>>1000). The VMS Delete command
tends to work slowly on a large directory because it reorganizes the
directory after the deletion of every file. FDEL reorganizes just once,
saving considerable time and I/O.

FDEL begins by parsing the command line using VMS suppiled parsing 
utilitites (CLI routines and CLD file). Wild cards are supported in
the file name as are date/time qualifiers (/SINCE and /BEFORE).

Before starting any deletion, FDEL makes a copy of the directory.
The current date and time are used for the file name of the copy. The 
copy can be used to recover in the event of a system crash. If the
deletion runs properly, the directory copy can be removed using the
SET FILE/NODIRECTORY command, then deleting it.

FDEL then opens the directory for read/write access (there by locking
out all other access). Each entry (file) is examined and determined
if it should be kept or deleted. If kept, the entry is copied to 
an in-memory buffer. If deleted, a $QIO is issued to delete the
file. After all the entries have been examined the in-memory buffer
is used to overwrite the contents of the directory. The end-of-block
field is adjusted accordingly.

FDEL reports progress after the examination of every 5000 files.

There is no support for directory recursion. That is, FDEL works on
just one directory at a time.

A directory file contains records that do not cross block boundaries.
Each record contains the file name (name + type) followed by version
number and file-id. The version/file-id fields repeat for as many 
versions exist for the file. A record length field precedes each record.
The layout might look something like:

     Rec-len | name . type | version-1 file-id-1 | version-2 file-id-2 ... 

A constant called MAX_BYTES_USED_IN_BLK is defined in FDEL and controls
how full each directory block becomes. This constant is irrevelent if
most or all the files are deleted from the directory.

FDEL was compiled, linked, and tested on a VMS system running:

     DEC C V6.5-001
     VMS   V7.3

Below are metrics comparing VMS DELETE and FDEL:

  Hardware:  AlphaServer 4100 EV5/300, HSJ50 controllers
  Operation: Delete 100,000 files

               VMS DELETE             FDEL

  CPU         00:08:35.29      00:01:15.80
  Wall Clock  06:03:58.59      00:26:19.75
  Direct I/O    2,039,139          236,009      


  Hardware:  GS160 EV6/731, HSG80 controllers
  Operation: Delete 100,000 files

               VMS DELETE             FDEL

  CPU         00:03:13.72      00:00:43.55      
  Wall Clock  00:35:23.56      00:02:58.73
  Direct I/O    2,039,139          203,039      


  Hardware:  GS160 EV6/731, HSG80 controllers
  Operation: Delete 500,000 files

               VMS DELETE             FDEL

  CPU         00:49:41.14      00:04:23.70
  Wall Clock  12:23:58.86      00:17:33.26
  Direct I/O   42,069,353        1,146,859


Further testing indicates that as the number of files to delete increases,
the resources used by FDEL increase linearly, O(n). For VMS DELETE this
resource usage increases exponentially, perhaps O(n**2) or greater.
