1 DEFRAG The defrag option is used to defragment a single file or files or an entire volume. Format DEFRAG file1,file2,...,@file3 (/DEVICE=device/BESTTRY) 2 Parameters file Specify a file (or list of files) with a full file specification or a logical name. Also, indirect command file may be used, e.g.: DEFRAG @DEFRAG.COM(/DEVICE=device). Thus, it is possible to generate a list with SEARCH device/OUTPUT=file and use that file as input to the DEFRAG command. The list generated by DFU SEARCH will contain the device name in the file specification. If there is a list of file from another source which does not contain the device name, the /DEVICE qualifier must be used to append the device name to the file. 2 Qualifiers /BESTTRY This qualifier directs DFU to create a file using the contiguous- best-try method. Default DFU tries to make a completely contiguous file. On highly fragmented or used disks this may be impossible. /DEVICE /DEVICE=device_name Append the device-name to the filename. /DISK Defragment the specified device rather than a file. The model used is based on a 4-pass strategy: o Pass 1: for any non-contiguous files, attempt to defragment them into existing exactly sized free space (in other words, for a 500 block file, look for a 500 block free space). o Pass 2: for any non-contiguous files, attempt to defragment them into a 'best fit' block of free space. o Pass 3: consolidate free space by moving files out of the largest block of free space into other matching free space blocks. o Pass 4: consolidate free space by moving files out of the largest block of free space into a 'best fit' block of free space. /EXCLUDE /EXCLUDE=([FILE=(fnm[,fnm...]]) /EXCLUDE=(INDEXED | RELATIVE | SEQUENTIAL | DIRECT | SPECIAL | FILE=...) When used with /DISK, allows files to be excluded from defragmentation operations based on organization or file name. Multiple file organizations may be specified. Files may be excluded by wildcarded name/type. Multiple names may be specified. /LBN /LBN= Move a single file to the target logical block number. This is faster than having the file system search for a new LBN location. Caution: Use this qualifier only for processing a single file, not a list of files. If there is not enough contiguous free space available at the target LBN, Defrag will fail with a DEVICEFULL error. /MAXSIZE /MAXSIZE=n Avoid moving files larger than n blocks. Requires /DISK. /PASSES /PASSES=number Number of iterations for defragmenting with /DISK. Sequentially execute phases 1 through 4 the specified number of passes. Defaults to 1 pass. Requires /DISK. /STATISTICS /STATISTICS /NOSTATISTICS (default) Controls whether CPU and I/O consumption of the command are shown. /UNTIL /UNTIL= Controls whether the defragment operation will be terminated after the specified time. When the time period has been reached, the operation will terminate at the end of the file currently being defragmented (i.e., if the file takes 5 minutes to defragment, and the timer expires after one minute, the current file will complete and no further files will be defragmented). This is similar to how CTRL/C functions. Absolute time includes a specific date or time of day. An absolute date/time has one of the following formats: o dd-mmm-yyyy o hh:mm:ss.cc o dd-mmm-yyyy:hh:mm:ss.cc o "dd-mmm-yyyy hh:mm:ss.cc" o BOOT o LOGIN o TODAY o TOMORROW o YESTERDAY You can omit any of the trailing fields in the date or time. You can omit any of the fields in the middle of the format as long as you specify the punctuation marks, for example, "-mmm-yyyy hh". Delta time is an offset from the current time to a time in the future. Delta time has the following format: o "+[dddd-][hh:mm:ss.cc]" You can truncate delta time after the hour field. You can also omit any of the fields after the hour field format as long as you specify the punctuation marks. Combination time consists of an absolute time value plus or minus a delta time value. Combination time can use either of the following formats: o "[absolute time][+delta time]" o [absolute time][-delta time] You can omit the absolute time value. If you do, the delta time is offset from the current date and time. Whenever a plus sign (+) precedes the delta time value, enclose the entire time specification in quotation marks. /WRITECHECK /WRITECHECK /NOWRITECHECK (default) Performs a write check on the resultant file after the defragment operation.