The Graham Utilities for OS/2 - Version 2


[Warpspeed]

[Table of Contents] [Index] [Previous] [Next]


HPFS-Ext - Report on HPFS file fragmentation

Summary

HPFS-Ext reports on the number of extents (fragments) of files.

Icon

Command Line Format

Usage: HPFS-Ext {Switches} <File Spec> Drive Spec(s)

Switches

-e
Extents first
-f
Force file names to lower case.
-h
Hard disks only.
-s
Subdirectories.
-on
Run on Machine Name.

Description

HPFS-Ext is a command line utility which reports the number of extents (or fragments) which each file matching the given file specification is in.

HPFS-Ext is capable of reporting on one file, one directory, one drive or all drives in one invocation. This can be especially useful if you wish to check to see if the drive needs defragmentation. The output of HPFS-Ext may be redirected to either a file or a printer to save the output.

If you ask HPFS-Ext to report on a non HPFS drive you will get the following message:

Drive is not HPFS.

-e Extents first

The default behaviour of HPFS-Ext is to list the file name followed by the number of extents of which each file comprises. The -e switch forces HPFS-Ext to list the extents first. This allows the output of HPFS-Ext to be piped into smart sort filters (such as GNU's GSORT) which can sort in numeric order. This will give you a list of files in fragmentation order, not file found order.

-f Force file names to lower case

On FAT partitions, file names are always displayed in lower case. HPFS partitions retain their case, but the file system does not differentiate between the case of file names, and they are displayed in the form in which they were entered. The -f option forces all displayed file names to be displayed in lower case.

-h Hard disks only

HPFS-Ext will scan all logical disk drives defined by the system, starting at drive C:. The drives are scanned in order, starting at C:, then D: and so on.

-s Subdirectories

HPFS-Ext will include subdirectories as part of its search of the specified disk drives. If a subdirectory name is included as part of the file specification, then the search will include that subdirectory and all subdirectories below it. If no subdirectory is given as part of the file specification, then the current directory and all below it are included in the search.

-on Run on Machine Name

This switch forces DEPIPE to be loaded and allows HPFS-Ext to access disk drives located on remote machines. The Machine Name must be specified with a leading "\\". The machine name of the remote machine will have been specified when the network software on the remote machine was installed.

Note : DESVR must be running on the remote machine for this option to work.

Consult Appendix H - DESVR for further details.

Examples

HPFS-Ext
HPFS-Ext will report the number of extents of all files in the current directory.
HPFS-Ext /s
HPFS-Ext will report the number of extents of all files in the current directory and all directories below it.
HPFS-Ext -h
HPFS-Ext will scan all hard disks.
HPFS-Ext C:\OS2
HPFS-Ext will list the number of extents of all files in C:\OS2.
HPFS-Ext C:\OS2 /s
HPFS-Ext will list the number of extents of all files in C:\OS2 and all directories below it.
HPFS-Ext E:\Data -on \\MAIN
HPFS-Ext will report the number of extents of all files in E:\DATA on the remote machine named MAIN.