Deletes files or directories.
DELETE device[:] or directory-file(s)
device
The device on which to perform the DELETE/FILE=file-id command.directory-file(s)
The filespecification of the directory on which to perform the DELETE/DIRECTORY command. Wildcard file specifications may be used. DFU will automatically add .DIR to the filespecification if a filetype is not provided.
/DIRECTORY
Specify the directory file which must be deleted. Wildcards may be used but must be used very carefully. Make sure that the directory does not contain non-empty subdirectories. Note that the directory file itself will also be deleted, unless the /KEEP qualifier is used.Example:
$ 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
/FILE=file-id
Specify a complete file-id (num,seq,rvn) of the file which must be deleted. This qualifier allows the deletion of lost files or files marked for delete. Example :$ 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
/KEEP
Preserve the directory tree; only delete the contents. /KEEP is only valid with the /DIRECTORY qualifier. /KEEP works for DELETE/DIR and DELETE/DIR/TREE./NOLOG
Do not log succesfull deletes to SYS$OUTPUT. /LOG is the default./NOREMOVE
Can only be used with /FILE. Default DELETE/FILE will try to remove the file from the parent directory. If the file's backlink no longer points to a valid directory this will generate an error. The /NOREMOVE qualifier overrules this behaviour allowing such files to be deleted./STATISTICS
This qualifier displays the performance statistics: CPU time, Elapsed Time, I/O and PageFaults./TREE
Can only be used with /DIRECTORY. The delete command will delete all subdirectories within the directory file specified. DFU will first sort out the subdirectory tree and than delete the files in the proper order. Thus a complete directory tree is deleted with one command.
This chapter describes the DIRECTORY command with the related
parameters and qualifiers.
8.1 Introduction
The DIRECTORY command offers 7 major functions. 3 functions deal with all directories on a disk, the other 4 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:
8.2 Discussion of directory compression
The DIRECTORY/COMPRESS function will improve performance on large
directories. There are some options which can further enhance
performance :
So, what strategy should be used when compressing directories?
8.3 Output formatting
The 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/OUTPUT=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, /DUMP or /RECOVER 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 on a disk. 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./RECOVER
This qualifier rebuilds a corrupted directory. Do not use this command on critical or active directories./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 disk's 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.
9.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 useful 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 /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>.
9.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 Volume set name : Highwater mark. / Erase on del. : No / No 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 (ODS2 / ODS5) : 40595 / 0 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) LBN +------------------------------------------------------------+ % 0->|***....***********.************.******...*********..********| 6% 208360->|************************************************************| 13% 416721->|************************************************************| 20% 625081->|******************************************************.*****| 26% 833442->|*******..*********************************..****************| 33% 1041802->|******.**.*********...********.*****.*******...*.**..*.***..| 40% 1250163->|.*..*****************....*.....**.*. ..*****.***..****. ..*| 46% 1458523->|**********. .*******************************************.**.| 53% 1666884->|.**... ....... .*******...**********.*..***********..******| 60% 1875244->|***.. ....*...**********. ..*********. .**************| 66% 2083605->|*********************************.*****.. .****... . .... | 73% 2291965->| ..*******.... ......**************************************| 80% 2500326->|****..*****.*****.**. .********...*.*****..*******.*..*| 86% 2708686->|.*******..*******.***..*.****************.*. .*...**********| 93% 2917047->|..**. .*********************.******.. .*******. |100% +------------------------------------------------------------+ * : Fully allocated, . : Partial allocated, <space> : Free, 3472 blocks each Free space distribution, each * = 2100 free blocks ***** Disk Usage Table (from INDEXF.SYS and QUOTA.SYS) ***** Identifier/UIC Used/Allocated Headers Quota Used/Perm ------------------------------------------------------------------------- [SSG,MRX] 42079/46356 2259 48615/60000 [SSG,TESTJE] 189306/254742 4935 259677/300000 [SSG,LARGEUSER] 47961/50238 1648 51886/65000 [SYSTEM] 499554/505626 4954 510580/2000000 . . .
The various items have the following meaning :
When using /GRAPH the disk's free space distribution is shown as a bitmap image. Each position in the graph represents a certain number of blocks (in the example above 3472 blocks). This bitmap image gives a quick impression about the free space distribution on the disk.
If you use the /USAGE qualifier a sorted 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 useful 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.
10.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.
10.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 . 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.
10.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.
10.4 Output formatting
The 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
10.5 UIC and identifier processing
Version V2.4 introduced 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 and later 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 match all qualifiers and options specified.
/ACCESS=option(,option)
The /ACCESS qualifier is used to search files depending on their last ACCESS date (VMS 7.2 only). The possible options are :
- /ACCESS=BEFORE=date
- /ACCESS=SINCE=date
- /ACCESS=NONE
/ACE=identifier
Search for files which have an ACE containing the specific identifier. Only ACE's of the format "IDENTIFIER=<identifier>,..." will be searched./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./ATTRIBUTE=option(,option)
The /ATTRIBUTE qualifier is used to search files depending on their last attribute change date (VMS 7.2 only). The possible options are :
- /ATTRIBUTE=BEFORE=date
- /ATTRIBUTE=SINCE=date
- /ATTRIBUTE=NONE
/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
- 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
Previous | Next | Contents