File and Volume specific commands, Hardlink management, Quota management, USN, Sparse file, Object ID and Reparse point management

Create a hardlink

    FSUTIL hardlink create New_filename Existing_filename

    Eg : fsutil hardlink create c:\foo.txt c:\bar.txt

Create a new file of a specific size

    FSUTIL file createnew filename length

    Eg : fsutil file createnew C:\testfile.txt 1000

Set the short NTFS filename for a file

    FSUTIL file setshortname filename ShortName

    Eg : fsutil file setshortname C:\testfile.txt tes1.txt

Set the valid data length for a file

    FSUTIL file setvaliddata filename datalength

    Eg : fsutil file setvaliddata C:\testfile.txt 4096

Set the zero data for a file

    FSUTIL file setzerodata offset=val length=val filename

    offset : File offset, the start of the range to set to zeroes
    length : Byte length of the zeroed range
        Eg : fsutil file setzerodata offset=100 length=150 C:\Temp\sample.txt

List all drives (including mapped and Subst drives)

    FSUTIL fsinfo drives

Query drive type for a drive

    FSUTIL fsinfo drivetype volume pathname

    Eg : fsutil fsinfo drivetype C:
    ListLocalDrives.cmd - List all drives on the local computer

Query volume information

    FSUTIL fsinfo volumeinfo volume pathname
    Eg : fsutil fsinfo volumeinfo C:\

Query NTFS specific volume information

    FSUTIL fsinfo ntfsinfo volume pathname

    Eg : fsutil fsinfo ntfsinfo C:

Query file system statistics

    FSUTIL fsinfo statistics volume pathname

    Eg : fsutil fsinfo statistics C:

QUOTA Management

    FSUTIL quota {query|disable|track|enforce } C:
    FSUTIL quota violations
    FSUTIL quota modify volume_pathname threshold limit user

    Eg : fsutil quota modify c: 3000 5000 domain\user

Find a file by user name (if Disk Quotas are enabled)

    FSUTIL file findbysid user directory

    Eg : fsutil file findbysid scottb C:\users

File system options:

    FSUTIL behavior query option

    FSUTIL behavior set option

      Where option is one of:
       allowextchar {0|1}       Allow extended characters in filenames
       Bugcheckoncorrupt {0|1}  Enable bugcheck  #
       disablecompression {0|1} Disable compression #
       disableencryption {0|1}  Disable encryption  #
       DisableDeleteNotify {0|1} SSD TRIM Delete notifications for all volumes#
       disablelastaccess {0|1}  Don’t generate last-access times
       disable8dot3 [volumePath] sfnNum
          sfnNum is between 0 and 3 
           0 = Create short file names (default).
           1 = don’t create short file names. 
           2 = Set 8.3 names on a per volume basis.
           3 = Disable 8.3 names on all volumes except the system volume.
       encryppagingfile {0|1}
       quotanotify NumSeconds   Log quota violations, default=3600 seconds
       memoryusage {1|2}           Paged-pool memory cache, 1=default #
       mftzone {1|2|3|4}        Set MFT Zone, multiple of 200MB
       symlinkevaluation L2L:{0|1}    Local to local symbolic links #
       symlinkevaluation L2R:{0|1}    Local to remote symbolic links #
       symlinkevaluation R2R:{0|1}    Remote to local symbolic links #
       symlinkevaluation R2L:{0|1}    Remote to remote symbolic links #

  1 = enable option
  0 = Disable option
  # = Windows7/2008+

    Eg :  FSUTIL behavior query disable8dot3 
          FSUTIL behavior set disablelastaccess 1

    FSUTIL dirty query volume pathname

    FSUTIL dirty set volume pathname

    Marking a disk as dirty will prompt a Chkdsk at next boot
    Eg :  FSUTIL dirty query C:

Query a reparse point

    FSUTIL reparsepoint query filename

    Eg : fsutil reparsepoint query C:\Server

Delete a reparse point

    FSUTIL reparsepoint delete filename

    Eg : fsutil reparsepoint delete C:\Server

Edit an object identifier

    FSUTIL objectid {query | set | delete | create}

Set sparse file properties

    FSUTIL sparse queryflag filename
    FSUTIL sparse setflag filename

    FSUTIL sparse queryrange filename
    FSUTIL sparse setrange filename
    Eg : fsutil sparse queryflag "C:\My Test.txt"

Query the allocated ranges for a file

    FSUTIL file queryallocranges offset=val length=val filename

    offset : File Offset, the start of the range to query
    length : Size, in bytes, of the range

    Eg : fsutil file queryallocranges offset=1024 length=64 C:\Temp\sample.txt

To run FSUTIL, you must be logged on as an administrator or a member of the Administrators group.

Sparse files provide a method of saving disk space for files that contain meaningful data as well as large sections of data composed of zeros. If an NTFS file is marked as sparse, then disk clusters are allocated only for the data explicitly specified by the application.
e.g. The Indexing Service, stores it's catalogs as sparse files.

With 8.3 filennames disabled you'll notice a performance improvement only with a large number of files (over 300,000) in relatively few folders where a lot of the filenames start with similar names. Not having 8.3 filenames available will prevent the use of old applications such as Word 2.0 and Excel 4.0

If you have a lot of small files, you might need a larger Master File Table to avoid MFT fragmentation:
FSUTIL behavior set mftzone 2 will reserve 25 % of the volume for the MFT.
1 = 12.5 %(default)
2 = 25%
3 = 37.5%
4 = 50%

This won't affect existing disk partitions, after changing the mftzone size, reboot the machine and create a new partition.

In Windows7 and Server 2008 the mft zone is allocated in blocks of 200MB:
1 = 200 MB (default)
2 = 400 MB
3 = 600 MB
4 = 800 MB

Increasing the MFT zone does not decrease the disk space available for data files.

The last access time attribute of NTFS can slow performance, if you disable it, the time set will simply be the Creation Time.
FSUTIL behavior set disablelastaccess 1


FSUTIL outputs a NULL character (not a space) after every drive specifier, this can cause difficulty when piping the output of fsutil into other commands (particularly FOR). The output from FSUTIL varies by OS see this forum thread for more detail.

Some features in fsutil are reported to not work correctly under FAT or FAT32 volumes e.g. FSUTIL dirty query.

“You can tune a file system, but you can't tune a fish” ~ Sun man page for tunefs


Q982018 - FSUTIL update - compatibility with Advanced Format Disks
CACLS - Change file permissions
CHKNTFS - Check the NTFS file system
DevCon - Device Manager Command Line Utility
DIRUSE - Display disk usage
DISKSHADOW - Volume Shadow Copy Service
Q174619 - MFT How NTFS reserves space for its Master File Table
Q961095 - MFT Master File Table zone reservation in Vista and Server 2008
Q286164 - Hard Links and System Restore
Q249734 - Backup Software, RSM and file last access date

© Copyright SS64.com 1999-2016
Some rights reserved