Subcommands
Fsutil contains a suite of subcommands, which are listed in Table I. Each of these subcommands may in turn have additional subcommands of its own. Many of these are quite specialized but some that are of more general interest are discussed in sections further on. Windows Vista has two additional subcommands not present in Windows XP and these are indicated in the table. They are included for completeness but are of limited interest to most PC users.
Subcommand | Description |
---|---|
behavior | Manages the settings for generating 8.3 character-length file names and for, updating the last access timestamp. Manages the amount of disk space reserved for the Master File Table. |
dirty | Queries or sets a volume's dirty bit. |
file | Finds a file by its security identifier, queries allocated ranges for a file, sets a file's short name, sets a file's valid data length, or sets zero data for a file. |
fsinfo | Lists all drives, queries the drive type, queries volume information, queries NTFS-specific volume information, or queries file system statistics. |
hardlink | Creates a hard link |
objectid | Manages object identifiers |
quota | Manages disk quotas on NTFS volumes |
repair (Vista) | Self healing management |
reparsepoint | Queries or deletes reparse points |
sparse | Manages sparse files |
transaction (Vista) | Transaction management |
usn | Manages the update sequence number (USN) change journal |
volume | Dismounts a volume or queries to see how much free space is available on a disk. |
Examples of applications of Fsutil
Here is a selection of applications of Fsutil that I have seen mentioned most often on the Web. If I have omitted one of your favorites, let me know and I will add it to the list.
Applications of the subcommand "behavior"
The subcommand "behavior" may be the one that an ordinary PC user is most likely to encounter. There are several features of the NTFS system that can be configured to possibly speed up the system and tweaks involving this subcommand are fairly commonly mentioned on the Web and in books. The subcommand "behavior" has two further subcommands. They are "query", which displays the current values for option settings and "set", which is used to change settings. The options that are available are shown in Table II. Options that are available only in Vista are indicated. Commands have the form fsutil behavior query {option} {value}
and fsutil behavior set {option} {value}
Commands involving "set" can change Registry entries and may require a reboot to take effect.
Option | Possible Values |
---|---|
allowextchar | 0 or 1 |
disable8dot3 | 0 or 1 |
disablecompression (Vista) | 0 or 1 |
disablelastaccess | 0 or 1 |
disableencryption (Vista) | 0 or 1 |
encryptpagingfile (Vista) | 0 or 1 |
mftzone | 0 through 4 |
memoryusage (Vista) | 0, 1 , 2 |
quotanotify | 1 through 4294967295 seconds |
SymlinkEvaluation (Vista) | Various |
Find the current settings
To display the current settings on a system, use a command with "query" such as:fsutil behavior query disablelastaccess
Disable short file names to speed up Windows
One tweak that is mentioned fairly often disables the creation of short 8,3 format file names. By default both Windows XP (NTFS) and Vista create file names in the old 8.3 format for all files in addition to whatever the regular name is. This is to ensure compatibility with some programs that still linger and require the old file naming format from DOS days. If you are sure that you do not have any 16-bit programs or programs that require the old format, disabling this extra name creation can possibly speed up your system.The command is: fsutil behavior set disable8dot3 1
Note that the Windows XP environment variables %TEMP% and %TMP% typically use short names. Program installations sometimes use these variables If this change causes trouble and you need to restore the short name function, the command is fsutil behavior set disable8dot3 0
Disable timestamp for last access to a file to speed up Windows
Another frequently seen recommendation is to disable the setting that keeps track of the last time a file. was accessed. Removing the necessity for the system to keep reading and writing this information may speed up Windows Explorer. The command is: fsutil behavior set disablelastaccess 1
Note that some backup programs may need this information. If you wish to restore the timestamp, the command is: fsutil behavior set disablelastaccess 0
Disable Encrypting File System in Windows Vista
Windows Vista Business and Ultimate come with a feature called the Encrypting File System (EFS). This can be fairly demanding of resources and if you have a marginal system that does not require this security feature, you can turn EFS off. The command is fsutil behavior set disableencryption 1
To restore EFS, use the commandfsutil behavior set disableencryption 0
(Although Windows XP Professional has EFS, this particular command is not available.).
Change the size of the Master File Table
NTFS uses a Master File Table (MFT) to store information about folders and files. Entire small files may even be included. By default, 12.5% of the volume is allocated to the MFT. Unless you have a small volume or a very large number of files, the default allocation should suffice. However, if you need more space for the MFT, you can use the command fsutil behavior set mftzone n
The parameter "n" can be 0 to 4. Table III shows the MFT allocation corresponding to each value of "n".
value for n | Space allocation for MFT |
---|---|
0 | No setting. Uses the default of 12.5% |
1 | 12.5% |
2 | 25% |
3 | 37.5% |
4 | 50% |
Displaying some drive properties
Fsutil has some very advanced methods for managing hard drives but I will mention only a few of more general interest.
Obtaining drive lists for a computer
There are other ways of doing this but you can obtain a list drives by letter type by using the command: fsutil fsinfo drives
Obtaining drive type
You can obtain the drive type for a given drive with the command:fsutil fsinfo drivetype D:
The command will return "Fixed drive", "CD-ROM drive", or "Removable drive".
Obtaining some general volume information
You can obtain a list of various volume parameters with: fsutil fsinfo volumeinfo C:
Determining amount of free space on a drive
To determine the amount of free space on a drive, use the command fsutil volume diskfree C: