$ DIR EXAMPLE Directory MYDISK:[RUBBISH] EXAMPLE.DIR;1 $ DFU DFU> DELETE/DIRECTORY EXAMPLE.DIR %DFU-I-CLEANUP, Deleting MYDISK:[RUBBISH]EXAMPLE.DIR;1... %DFU-S-DELETED, File DBGINI.COM;3 deleted %DFU-S-DELETED, File ICON.COM;1 deleted %DFU-S-DELETED, File I_FOOL.COM;1 deleted %DFU-S-DELETED, File LOGICALS.COM;51 deleted %DFU-S-DELETED, File LOGIN.COM;79 deleted %DFU-S-DELETED, File LOGOUT.COM;4 deleted %DFU-S-DELETED, File NOTE_COMPRESS.COM;3 deleted %DFU-S-DELETED, File SHOWCL.COM;3 deleted %DFU-S-DELETED, File SYMBOLS.COM;89 deleted %DFU-S-DELETED, File TPUBUILD.COM;5 deleted %DFU-S-TOTAL, 11 file(s) deleted %DFU-S-DELETED, File EXAMPLE.DIR;1 deleted
$ DFU DFU> VERIFY MYDISK: %DFU-S-CHKHOME, Home block info verified OK %DFU-I-IFSCAN, Scanning INDEXF.SYS... %DFU-E-INVBAKFID, file (86,17915,1) 0004CF04$BFS.;1 has invalid backlink %DFU-W-DELETED, file (537,2878,1) APPL_UTRYIT_BOOK.TMP;1 marked for delete . . . DFU> DELETE MYDISK/FILE=(86,17915,1) %DFU-S-DELETED, File 0004CF04$BFS.;1 deleted DFU> DELETE MYDISK/FILE=(537,2878,1) %DFU-S-DELETED, File APPL_UTRYIT_BOOK.TMP;1 deleted
This chapter describes the DIRECTORY command with the related
parameters
and qualifiers.
7.1 Introduction
The DIRECTORY command offers 6 major functions. 3 functions deal with all directories on a disk, the other 3 functions are used for manipulating individual directories. These functions are activated by special qualifiers:
The diskwide function qualifiers can be used in one command; other combinations of qualifiers are not possible. Note that the diskwide directory functions can take several minutes to complete because a complete directory scan uses a lot of disk I/O (approximately 2 I/O's per directory).
An indirect command file containing a list of files can be used as a parameter to /COMPRESS or /DUMP. Such a list can be generated with the SEARCH command. Example:
DFU> SEARCH disk/FILE=*.DIR/SIZE=MIN=50/OUT=x.x DFU> DIRECTORY/COMPRESS @x.x
Caution: Care should be taken when compressing critical system directories. To be safe you should first use the /TEST qualifier before compressing the directory. Another problem may be caused by a systemcrash just when DFU is rewriting the new compressed directory (although the chance that this happens is very small). When this happens you can recover the files by executing the following procedure:
7.2 Discussion of directory compression
Version V2.2 of DFU introduced a major change in the directory compression process (issued by the DIRECTORY/COMPRESS command). Previously versions always performed a maximum compression , and then truncated the resultant directory. This may be usefull on a dormant directory , but on an active directory this method introduced new problems:
The first problem is now solved by NOT doing an automatic TRUNCATION of the directory. The /TRUNCATE qualifier has been added to allow truncation on the users request. Also /TRUNCATE=blocksize is possible to perform partial truncation; DFU will not truncate below the blocksize issued in /TRUNCATE. (The actual blocksize will be rounded up to a multiple of the disks cluster size.) The second problem is solved by the new /FILL_FACTOR qualifier. Here a user can direct DFU to fill each directory block up to a certain percentage (between 50 and 100). Not specifying /FILL_FACTOR is the same as doing /FILL_FACTOR=100 (full compression). Note however that the directory's allocated size must be large enough to allow a lower fill factor. If that is not possible DFU will issue a DFU-E-EXTERR error, and you must use a higher fill factor. So, what strategy should be used when comnpressing directories?
A new qualifier /FORMAT can be used with DIRECTORY/VERSION. This allows the build up of a command procedure directly from the output generated by the DIR/VERSION command. /FORMAT has the following restrictions :
Example:
DFU> DIR/VERSION=4/OUTP=PURGE.COM/FORMAT="$PURGE/KEEP=3 !AS" mydisk
Performs directory functions.
DIRECTORY device[:] or directory-file(s)
device
The device on which to perform one of the diskwide directory functions.directory-files(s)
The file specification of the directory on which to perform the /CREATE , /COMPRESS or /DUMP function. Wildcard file specifications may be used. DFU will automatically add .DIR to the filespecification if a filetype is not provided.
/ALIAS
The /ALIAS qualifier directs DFU to scan all directories for alias file entries. Only alias files in DIFFERENT directories will be found (this is the most common situation). Normally only the system disk should contain alias files. This qualifier can be combined with /VERSION=n and /EMPTY./ALLOCATE=n
Used in combination with /CREATE. Creates the new directory with an allocated size of 'n' blocks./COMPRESS
Performs the directory compression unless /TEST is also specified. The output will show the results in terms of file sizes. Example:DFU> DIR/COMP OWN$:[000000]MAIL %DFU-S-DONE, OWN$:[000000]MAIL.DIR;1: 31 files; was : 4/9, now : 3/3 blocks DFU>
/CREATE
Create a new , empty directory. The allocated size will be 1 cluster unless /ALLOCATE is specified./DEVICE
The device on which the files reside. The device name is added to the file name. If you generate a file list with the DFU SEARCH command you don't need this qualifier. However you may have a list of files produced from another source and thus need to append a device name to it. This qualifier can only be used in combination with /COMPRESS or /DUMP./DUMP
Produce a block level dump of a directory. /DUMP will interpret the directory entries found in each block. A directory entry contains a size, version-limit, type and name field. Next the directory entry contains a list of versions and file ID's for this entry. /DUMP will produce a rather low level output of this information. Example :DFU> DIR/DUMP C.DIR DUMP of directory block 1 Size: 22, Version limit: 3, Type: 0, Name(10): CHKDSK.EXE Version: 3, FID : (1027,1456,0) Size: 26, Version limit: 3, Type: 0, Name(13): CHKDSK.README Version: 2, FID : (33892,1171,0) Version: 3, FID : (1256,11234,0) Size: 22, Version limit: 3, Type: 0, Name(10): CHKDSK.SAV Version: 2, FID : (13947,100,0) Size: 24, Version limit: 3, Type: 0, Name(11): CHKDSK.SAVE Version: 1, FID : (12531,2114,0) Size: 26, Version limit: 3, Type: 0, Name(14): CHKDSK_LNK.COM Version: 2, FID : (12314,72,0) Size: 18, Version limit: 3, Type: 0, Name(5): C_D.C Version: 3, FID : (32650,32,0) Size: 20, Version limit: 3, Type: 0, Name(7): C_D.EXE Version: 9, FID : (2675,64,0) Size: 20, Version limit: 3, Type: 0, Name(7): C_D.OBJ Version: 4, FID : (9835,117,0) Size: 20, Version limit: 3, Type: 0, Name(7): C_D_2.C Version: 15, FID : (12428,84,0) Size: 22, Version limit: 3, Type: 0, Name(9): C_D_2.OBJ Version: 9, FID : (8439,119,0) Size: 22, Version limit: 3, Type: 0, Name(9): C_D_3.CLD Version: 3, FID : (9777,178,0) Size: 22, Version limit: 3, Type: 0, Name(9): C_D_3.OBJ Version: 2, FID : (9737,161,0) Size: 20, Version limit: 3, Type: 0, Name(7): C_D_4.C Version: 3, FID : (10594,1580,0) Size: 22, Version limit: 3, Type: 0, Name(9): C_D_4.OBJ Version: 2, FID : (10177,109,0) DUMP of directory block 2 Size: 18, Version limit: 3, Type: 0, Name(5): DFU.C Version: 169, FID : (31123,52,0) . . . %DFU-I-TOTAL, OWN$:[SOURCES.FORTRAN.DFUSRC]C.DIR;1: 42 files
/EMPTY
The /EMPTY qualifier will produce a list of empty directories. This qualifier can be combined with /ALIAS and /VERSION=n./FILL_FACTOR=n
Specifies ,in percentage, the filling of directory blocks during a /COMPRESS operation. Fill factor may be between 50 and 100. Omitting this qualifier is the same as /FILL_FACTOR=100 (maximum compression). If the directory has not enough allocated space a low fill factor may result in failure of the Compress operation. DFU will issue a DFU-E-EXTERR error, and the directory file will not be modified./FORMAT=format-string
Create an output file in a format described by the format string. The string must contain the !AS directive (this must be uppercase). At the !AS location the resultant filename will be filled in. The /OUTPUT qualifier is required./OUTPUT=filename
This qualifier redirects the output to a file. The output will also go to SYS$OUTPUT./STATISTICS
This qualifier displays the performance statistics: CPU time, Elapsed Time, I/O and PageFaults./TEST
The /TEST can only be used in conjunction with /COMPRESS. The qualifier will show the results of the /COMPRESS but will not compress the directory file./TRUNCATE=blocksize
During a compress operation truncate the directory back to the blocksize specified. If blocksize is not specified, the file will be truncated back to the end-of-file block number. Truncation will always be rounded up to the next highest multiple of the disks cluster size./VERSION=n
The /VERSION qualifier directs DFU to scan all directories on the device to produce a list of files which have at least 'n' versions. This qualifier can be combined with /ALIAS and /EMPTY.
This chapter describes the REPORT command with the related parameters
and qualifiers.
8.1 Description
The REPORT command function generates a report of the file and free space fragmentation of the disk. Also a graph may be generated by the /GRAPH qualifier; this visualises the free space distribution on your disk. The /USAGE qualifier will generate a diskspace usage report. This is especially usefull if DISKQUOTA is not enabled on the disk.
The default report contains information of the Volume, files
and the bitmap. This output can be suppressed by the new
/NOVOLUME, NOFILE and NOBITMAP qualifiers.
Also the /USAGE qualifier can be used by displaying information
of a specific UIC or Identifier simply by specifying /USAGE=<uic>
or /USAGE=<identifier>.
8.2 Syntax and Output
The syntax of the report command is:
DFU> REPORT device/QUALIFIERS
Below follows an example and output of the report command:
DFU> REPORT USER3:/GRAPH/USAGE %DFU-I-REPORT, Reporting on USER3: ($1$DUA102:) ***** Volume info for USER3: (from HOME block) ***** Volume name : USER3 Volume owner : SYSTEM Structure name : Clustersize : 3 Maximum # files : 367618 First header VBN : 103 Header count : 51547 (1) Free headers : 10951 (2) ***** File statistics (from INDEXF.SYS) ***** INDEXF.SYS fragments /map_in_use : 21 / 61 (39% used) (3) Total files : 40595 Files with extension headers : 0 Files marked for delete : 19 , size : 25/63 blocks Directory files : 1957 Empty files : 177 Files with allocation : 40418 Contiguous files : 40326 (4) Total size used /allocated : 2492431 /2533209 Total fragments : 40770 Average fragments per file : 1.009 (5) File fragmentation index : 0.692 (excellent) (6) Average size per fragment : 62 Most fragmented file : $1$DUA102:[LARGEUSER]A.DAT;1 ( 180/630 blocks; 30 fragments) ***** Free space statistics (from BITMAP.SYS) ***** Total blocks on disk : 2940951 Total free blocks : 407742 Percentage free (rounded) : 13 Total free extents : 260 Largest free extent : 42912 blocks at LBN: 2463597 (7) Average extent size (rounded) : 1568 Free space fragmentation index : 0.191 (excellent) (6) %free------------------------------------------------------------------ 100 | | 95 | | 90 | | 85 | * | 80 | * | 75 | * | 70 | * * | 65 | * * | 60 | * * | 55 | * * | 50 | * * * * | 45 | * * * * * | 40 | * ** * * * | 35 | * ** * * ** | 30 | * * *** * * * * ** | 25 | * ** * *** * * ** *** ** * | 20 | * ** * *** * * * ** *** ** * | 15 | * * * * * * ********** * * * ** *** ** * | 10 | * * * * *** ********** ** * * ** **** ** * | 5 | * * * * ***** ************** * * ** **** ** * | ------------------------------------------------------------------- LBN: 0 2940951 Free space distribution, each * = 2100 free blocks ***** Disk Usage Table (from INDEXF.SYS and QUOTA.SYS) ***** Identifier/UIC Used/Allocated Headers Quota Used/Perm ------------------------------------------------------------------------- [SYSTEM] 499554/505626 4954 510580/2000000 [SSG,MRX] 42079/46356 2259 48615/60000 [SSG,TESTJE] 189306/254742 4935 259677/300000 [SSG,LARGEUSER] 47961/50238 1648 51886/65000 . . .
The various items have the following meaning :
The disks free space distribution as a bar graph. On the horizontal axis the Logical Block Number (LBN) is shown, running from 0 to the maximum block number. Each * represents a certain number of contiguous free blocks.
If you use the /USAGE qualifier a usage table will be added. Per Identifier / UIC the blocks used/allocated , and the number of file headers are shown. If Diskquota is enabled a third column will be included which shows the blocks used/permitted allowing to QUOTA.SYS. Normally quota should satisfy the following rule :
Quota used = blocks allocated + # of file headers
Create a file and free space report of a disk device.
REPORT device[:]
device[:]
Device to be reported. You may also specify a logical devicename.
/APPEND=filename
This qualifier redirects the output to be appended to an already existing file. If the output file does not exists it will be created. You can use /APPEND or /OUTPUT but not both./GRAPH
This qualifier generates a graph table which visualizes the free space distribution on the disk. /NOGRAPH is the default./NOBITMAP
The /NOBITMAP qualifier suppresses the "Free space statistics" output./NOFILE
The /NOFILE qualifier suppressed the "File Statistics" output./NOVOLUME
The /NOVOLUME qualifier suppresses the "Volume info" output./OUTPUT=filename
This qualifier redirects the output to a file. The output will also go to SYS$OUTPUT./STATISTICS
This qualifier displays the performance statistics: CPU time, Elapsed Time, I/O and PageFaults./USAGE(=uic or identifier)
The /USAGE qualifier will generate a diskspace usage report based on Identifiers/UIC. If diskquota is enabled on the disk the blocks used/permitted allowing to QUOTA.SYS will also be shown. /USAGE is very usefull when diskquota is not enabled on the disk. When a uic or identifier is specified only the information for this uic or identifier will be displayed.
This chapter describes the SEARCH command with the related parameters
and qualifiers.
9.1 Introduction
The search function allows very quick disk-wide
searches for specific files. You can use almost any
possible file attribute as a search qualifier.
9.2 Syntax and Output
The command syntax for SEARCH is:
DFU> SEARCH device/qualifiers
The output is displayed on your terminal. You can also sort the output with the /SORT qualifier. The output is shown in 2 or 3 columns eg:
DFU> SEARCH MYDISK/FILE=X.X/FRAGMENT . . $1$DUA102:[USER.COMMAND]X.X;1 1/3 1/1 . .
The first column shows the full file name . As of this version of DFU
the
device name is included in the file name. The second
columns shows the file size as actual/allocated size. The 3rd column
is optional and will only be shown when the /FRAGMENT qualifier is
used. It
shows the number of fileheaders / number of file fragments.
9.3 Volume Set processing
SEARCH checks if the device to-be-searched is member of a
volume set. If so, the complete volume set will be processed,
starting with Relative Volume Number 1 up to the last
member in set. You can override this behaviour with the /NOVOLSET
qualifier.
9.4 Output formatting
A new qualifier /FORMAT can be used with SEARCH. This allows the build up of a command procedure directly from the output generated by the SEARCH command. /FORMAT has the following restrictions :
Example:
DFU> SEARCH/OUTP=DEL.COM/FORMAT="$DELETE/CONF !AS"/FILE=*.LOG mydisk
9.5 UIC and identifier processing
This version introduces an improved handling of UIC's. Previous versions of DFU only accepted a numeric UIC in the /OWNER qaulifier or an identifier in the /IDENT qualifier. V2.4 now accepts all valid uic and identifier formats (numeric and alphanumeric) in the /OWNER and /IDENT qualifiers. Technically there is no longer any difference between these two qualifiers, but they will be left in for compatibility reasons.
Fast file search through INDEXF.SYS.
SEARCH device[:]
device[:]
Device to be searched. You may also specify a logical devicename.
The SEARCH command is used for quick disk-wide searches for specific files. The qualifiers describe the file attributes used as the search criteria. You can combine almost all of the possible qualifiers, unless otherwise specified. Eg.:DFU> SEARCH DISK1/SIZE=MIN=10/OWN=[1,4]/CREATED=SINCE=YESTERDAYis a valid command. Note that qualifiers will be used in a logical AND manner, that is, SEARCH will only display files which obey to all qualifiers and options specified.
/ALLOCATED
Default, SEARCH will use the actual file size. The /ALLOCATED qualifier forces SEARCH to use the allocated filesize. This qualifier is only meaningfull if you combine it with /SIZE./APPEND=filename
This qualifier redirects the output to be appended to an already existing file. If the output file does not exists it will be created. You can use /APPEND or /OUTPUT but not both./BACKUP=option(,option)
The /BACKUP qualifier is used to search files depending on their backup date. The possible options are :
- /BACKUP=BEFORE=date
- /BACKUP=SINCE=date
- /BACKUP=NONE
The NONE option gives files which don't have a backup date recorded.The other 2 options can be used to get files which have a backup date before or after a specific date. The BEFORE and SINCE option can be combined in one command.
/BAKFID=backlink-file-id
You can use this qualifier to look for a file with a specific backlink. Only the first part of the file id must be specified, that is, if the file id is (x,y,z) you must specify 'x' as the file id. You can use this qualifier to get files from a specific directory. If you use /BAKFID=0 you will get files not belonging to a directory (often temporary files)./CHARACTERISTIC=(char1,char2...)
This qualifier is used to get files with specific file characteristics.The characteristics can have the following values:
- Directory : directory files
- Nobackup : files marked nobackup
- Contiguous : files marked as contiguous
- Erase : erase file before deletion
- Spool : spool files
- Badblock : files which contain suspected bad block(s)
- Badacl : files with a corrupted ACL
- Besttry : files marked contiguous-best-try
- Scratch : files marked as scratch files
- Nocharge : files not charged against quota
- Nomove : files marked NoMove (VMS 5.5+)
- Locked : files with the deaccess lock bit set
- Marked : files marked for deletion
- Noshelvable : files which can not be shelved
- Isshelved : files which are shelved
The several characteristics can be combined in one command.If you want a logical OR behaviour in stead of the default AND behaviour, you can use the special option MATCH=OR eg:
SEARCH disk/CHAR=(NOMOVE,DIR,MATCH=OR)
/CREATED=option(,option)
The /CREATED qualifier is used to search files depending on their creation date. The options are :
- /CREATED=BEFORE=date
- /CREATED=SINCE=date
These 2 options can be used to get files which have a creation date before or after a specific date. The BEFORE and SINCE option can be combined in one command.
/EXCLUDE=(file1,file2...)
This qualifier is used to exclude files from the search. You can use wildcard filenames ; you can also specifiy a list of files./EXPIRED=option(,option)
The /EXPIRED qualifier is used to search files depending on their expiration date. The options are :
- /EXPIRED=BEFORE=date
- /EXPIRED=SINCE=date
- /EXPIRED=NONE
The NONE option gives files which don't have a expiration date recorded.The other 2 options can be used to get files which have a expiration date before or after a specific date. The BEFORE and SINCE option can be combined in one command.
/FID=file-id
The /FID qualifier is a special function of SEARCH. It directs SEARCH to go directly to the specified file without processing the rest of the Index file. Therefore, you cannot combine this qualifierwith other search qualifiers such as /FILE. Normally a file-id consists is in the form (x,y,z) where x is the number of the file header within INDEXF.SYS y is the sequence number, and z is the Relative Volume Number. You only need to specifiy the x value in the /FID qualifier./FILE=(file1,file2...)
This qualifier is used to search for files with a specific file name.You can use wildcard file names; also you can specify a list of files./FORMAT=format-string
Create an output file in a format described by the format string. The string must contain the !AS directive (this must be uppercase). At the !AS location the resultant filename will be filled in. The /OUTPUT qualifier is required./FRAGMENT(=(MINIMUM=nr,MAXIMUM=nr))
This qualifier displays the number of fragments and file headers of each file found. You can further limit the files found by using the MINIMUM and MAXIMUM= options. For example:
Next page... | Contents