fsutilFSUTIL Command Guide - Advanced File System Utilities for Windows
Learn how to use the fsutil command for advanced file system management including NTFS operations, disk quotas, sparse files, USN journal, and volume information. Includes syntax, practical examples, and system administration tasks.
The fsutil command is a powerful Windows Command Prompt utility that performs advanced file system operations including creating files, managing sparse files, configuring NTFS behavior, querying volume information, and manipulating USN (Update Sequence Number) journals. Use fsutil file createnew filename.txt 1000000 to create files of specific sizes, fsutil behavior query to view NTFS settings, or fsutil volume diskfree C: to display detailed disk space information.
Whether you're testing disk performance with large files, managing NTFS quotas and compression, creating hard links and junctions, troubleshooting file system issues, or performing advanced storage administration, mastering fsutil provides low-level file system control unavailable in standard Windows tools. IT professionals and system administrators rely on this command for storage management, performance testing, troubleshooting, and automating complex file system operations.
This comprehensive guide covers fsutil syntax, all major subcommands (file, behavior, volume, hardlink, sparse, usn, quota), practical examples for real-world scenarios, NTFS optimization techniques, troubleshooting tips, common administrative tasks, related commands, and frequently asked questions. By the end, you'll confidently perform advanced file system operations from the command line for system administration, testing, and automation.
What Is the Fsutil Command?
The fsutil command (file system utility) is an advanced command-line tool introduced in Windows 2000/XP that provides direct access to NTFS file system features and low-level disk operations:
- File operations – Create files of specific sizes, set sparse file flags, manage hard links
- Behavior settings – Query and modify NTFS file system behavior
- Volume information – Detailed disk space, volume properties, filesystem statistics
- USN journal – Manage Update Sequence Number change journal for file tracking
- Quota management – Configure and query disk quotas per user
- Sparse files – Create and manage sparse files for efficient storage
- Hardlinks and reparse points – Create filesystem links and junctions
Why Use Fsutil?
Fsutil provides capabilities beyond standard Windows GUI tools:
- Testing – Create large test files instantly without writing actual data
- Performance – Optimize NTFS behavior for specific workloads (8.3 naming, last access time)
- Storage management – Advanced disk space queries, quota administration
- Troubleshooting – Query filesystem internals, USN journal analysis
- Automation – Script complex file system operations for deployment or maintenance
Administrator Privileges Required
Important: Almost all fsutil operations require administrator privileges. Always run Command Prompt as administrator before using fsutil commands.
The command works in Command Prompt (CMD) and PowerShell. Available in Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, and all Windows Server editions since Windows 2000 Server.
Fsutil Command Syntax
The fsutil command uses a subcommand structure:
fsutil <subcommand> <action> [parameters]
Major Subcommands
| Subcommand | Purpose |
|---|---|
file | File operations (create, zero data, set EOF) |
behavior | Query/set NTFS behavior settings |
volume | Volume information and operations |
hardlink | Create and list hard links |
sparse | Manage sparse files |
usn | USN (Update Sequence Number) journal operations |
quota | Disk quota management |
fsinfo | File system information |
objectid | Object identifier management |
reparsepoint | Reparse point management |
resource | Transactional resource manager operations |
tiering | Storage tiering management (Windows 8.1+) |
repair | Self-healing management (Windows 8+) |
Getting Help
To see available subcommands:
fsutil
To see options for specific subcommand:
fsutil file
fsutil behavior
Each subcommand has detailed help accessible via the command without parameters.
File Operations (fsutil file)
Create Empty File of Specific Size
To create a file with specific size instantly:
fsutil file createnew testfile.bin 1048576
Creates testfile.bin with exactly 1,048,576 bytes (1 MB). File is created instantly without writing data—much faster than generating actual content.
Use cases:
- Testing disk operations with large files
- Placeholder files for applications
- Performance testing with specific file sizes
Create Large Test File
To create a 10 GB test file:
fsutil file createnew largefile.dat 10737418240
Creates 10 GB file instantly (10 * 1024 * 1024 * 1024 = 10,737,418,240 bytes). Essential for storage and backup testing.
Set Valid Data Length
To set valid data length (actual data vs. file size):
fsutil file setvaliddata filename.txt 500000
Sets the valid data length to 500,000 bytes. Used for sparse file management and database applications.
Set Zero Data
To mark file region as zeroes without writing:
fsutil file setzerodata offset=0 length=1000 filename.txt
Marks first 1,000 bytes as zero without physically writing zeros. Efficient for clearing file regions in sparse files.
Set End of File (Truncate)
To set file size (truncate or extend):
fsutil file seteof filename.txt 5000
Sets file size to exactly 5,000 bytes. Truncates if larger, extends if smaller.
Query File Information
To get detailed file information:
fsutil file queryfileid C:\Windows\System32\notepad.exe
Displays internal file identifier. Useful for low-level file system analysis and troubleshooting.
NTFS Behavior Settings (fsutil behavior)
Query All Behavior Settings
To view all NTFS behavior settings:
fsutil behavior query
Output:
DisableLastAccess = 1
EncryptPagingFile = 0
MftZoneReservation = 1
DisableCompression = 0
SymlinkEvaluation = Local to local and local to remote symbolic links enabled
DisableDelete = 0
Shows current NTFS configuration. These settings affect performance and functionality.
Query Specific Setting
To check last access time tracking:
fsutil behavior query DisableLastAccess
Output:
DisableLastAccess = 1 (Enabled)
0= Last access time updated (default, performance impact)1= Last access time NOT updated (better performance)
Disable Last Access Time Updates
To improve performance on file servers:
fsutil behavior set DisableLastAccess 1
Disables last access time updates for all NTFS files. Performance benefit: Reduces disk writes, improving performance on servers with heavy file access.
Tradeoff: Applications relying on last access time won't work correctly. Backup software and file usage tracking may be affected.
Set MFT Zone Reservation
To reserve space for Master File Table:
fsutil behavior set MftZoneReservation 2
Values: 1-4 (higher = more space reserved for MFT). Default is 1.
When to increase: Volumes with many small files benefit from larger MFT zones (reduces fragmentation).
Enable 8.3 Name Creation
To control 8.3 (short) filename generation:
fsutil behavior set Disable8dot3 0
Values:
0= Enable 8.3 names on all volumes (default for older systems)1= Disable on all volumes (performance benefit)2= Per-volume setting3= Disable on all except system volume
Modern systems: Disable 8.3 naming (1) for performance unless legacy application compatibility required.
Query Encryption Paging File
To check if paging file is encrypted:
fsutil behavior query EncryptPagingFile
Security consideration: Encrypting paging file prevents memory dumps from exposing sensitive data.
Volume Information (fsutil volume)
Display Disk Free Space
To show detailed disk space information:
fsutil volume diskfree C:
Output:
Total # of free bytes : 123456789012
Total # of bytes : 500000000000
Total # of avail free bytes : 123456789012
More detailed than dir or File Explorer. Shows total space, free space, and available space (may differ due to quotas).
Query Volume Information
To get comprehensive volume details:
fsutil volume queryinfo C:
Output:
Volume Name : OS
Volume Serial Number : 0x12345678
Max Component Length : 255
File System Name : NTFS
Supports Case-sensitive filenames
Preserves Case of filenames
Supports Unicode in filenames
Supports Disk Quotas
Supports Sparse Files
Supports Reparse Points
Supports Object Identifiers
Supports Encrypted File System
Supports Named Streams
Complete filesystem capability report. Essential for compatibility and troubleshooting.
List All Volumes
To enumerate all volumes:
fsutil volume list
Output:
\\\?\\Volume{12345678-1234-1234-1234-123456789012}\
\\\?\\Volume{87654321-4321-4321-4321-210987654321}\
C:\
D:\
Shows both mount points and volume GUIDs. Useful for scripting and identification.
Dismount Volume
To force-dismount a volume:
fsutil volume dismount E:
Forces volume dismount. Warning: Closes all handles; may cause data loss if files are open. Use for maintenance or troubleshooting.
Hard Links (fsutil hardlink)
Create Hard Link
To create a hard link to existing file:
fsutil hardlink create newlink.txt existingfile.txt
Creates newlink.txt as hard link to existingfile.txt. Both names reference same file data. Changes to either affect both.
Hard link characteristics:
- Must be on same volume (same NTFS partition)
- Both names reference same inode/file record
- Deleting one doesn't affect the other (file deleted when last link removed)
- Cannot link directories (use junctions or symbolic links instead)
Use cases:
- Space-efficient file duplication
- Multiple names for same file
- Backup optimization (deduplication)
List Hard Links
To find all hard links to a file:
fsutil hardlink list C:\path\to\file.txt
Output:
\path\to\file.txt
\path\to\otherlink.txt
Shows all hard links pointing to same file data. Useful for understanding file relationships.
Sparse Files (fsutil sparse)
Set Sparse Flag
To mark file as sparse:
fsutil sparse setflag largefile.dat
Marks file as sparse. Sparse files don't allocate disk space for zero-filled regions, saving storage.
Sparse file benefits:
- Database files with large zero regions
- Virtual machine disk images (dynamic disks)
- Log files with gaps
- Application data files with reserved but unused space
Query Sparse Flag
To check if file is sparse:
fsutil sparse queryflag filename.dat
Output:
This file is set as sparse
Or:
This file is NOT set as sparse
Query Sparse Ranges
To see which file regions actually allocate space:
fsutil sparse queryrange filename.dat
Output:
Sparse ranges for file filename.dat:
Start: 0 Length: 10000
Start: 50000 Length: 5000
Shows only allocated regions. Gaps between ranges are sparse (zero-filled, no disk space).
Set Sparse Range
To mark file region as sparse:
fsutil sparse setrange filename.dat 10000 40000
Marks bytes 10,000-50,000 as sparse (deallocates disk space). Data becomes zero-filled without physical storage.
USN Journal (fsutil usn)
Query USN Journal Information
To view USN journal status:
fsutil usn queryjournal C:
Output:
Usn Journal ID : 0x12345678
First Usn : 0x0000000000000000
Next Usn : 0x0000000123456789
Lowest Valid Usn : 0x0000000000000000
Max Usn : 0x7fffffffffffffff
Maximum Size : 0x2000000 (32 MB)
Allocation Delta : 0x800000 (8 MB)
USN journal tracks all file system changes (create, delete, modify). Used by backup software, search indexing, and file synchronization.
Read USN Journal Records
To read change records:
fsutil usn readjournal C: csv
Displays all recent file system changes in CSV format. Useful for auditing file modifications.
Create USN Journal
To create USN journal on volume:
fsutil usn createjournal m=33554432 a=4194304 C:
Creates journal with 32 MB maximum size (m=) and 4 MB allocation delta (a=). Required for change tracking.
Delete USN Journal
To remove USN journal:
fsutil usn deletejournal /d C:
Deletes journal and all records. Warning: Breaks applications relying on change tracking (backup software, search indexing).
Quota Management (fsutil quota)
Query Quota Information
To view quota status for volume:
fsutil quota query C:
Shows disk quota configuration and per-user quota statistics.
Enable Disk Quotas
To enable quota tracking:
fsutil quota enforce C:
Enforces quota limits. Users exceeding quota cannot create new files.
Disable Disk Quotas
To disable quota enforcement:
fsutil quota disable C:
Disables quota enforcement but keeps tracking. Users can exceed limits without errors.
Modify User Quota
To set quota for specific user:
fsutil quota modify C: 5368709120 10737418240 Domain\Username
Sets 5 GB quota with 10 GB limit for specified user. First value is warning threshold, second is hard limit.
Common Use Cases
Performance Testing File Creation
Create large test file for benchmark testing:
fsutil file createnew performance_test.dat 53687091200
Instantly creates 50 GB file for testing disk performance, backup speed, or application behavior with large files.
Optimize File Server Performance
Disable last access time tracking on file servers:
fsutil behavior set DisableLastAccess 1
Improves performance on servers with heavy read activity by eliminating last-access-time writes on every file read.
Check Disk Space Detailed
Get precise disk space information:
fsutil volume diskfree C:
More accurate than File Explorer. Shows exact byte counts for scripting and capacity planning.
Create Space-Efficient Test Files
Generate database test file with sparse regions:
fsutil file createnew database_test.mdf 10737418240
fsutil sparse setflag database_test.mdf
fsutil sparse setrange database_test.mdf 1000000 9737418240
Creates 10 GB file that uses minimal disk space (only 1 MB allocated). Perfect for testing database applications without consuming storage.
Backup Multiple File Locations
Create hard links for efficient backups:
fsutil hardlink create D:\Backup\important.doc C:\Users\Documents\important.doc
Both locations reference same data. Modify either, both reflect changes. Saves backup storage space.
File System Forensics
Analyze recent file changes via USN journal:
fsutil usn queryjournal C:
fsutil usn readjournal C: csv > changes.csv
Audit all file system modifications. Useful for security investigations or troubleshooting unexpected changes.
Quota Reporting
Generate quota usage report:
fsutil quota query C: > quota_report.txt
Document per-user disk usage for capacity planning or billing.
Disable 8.3 Naming for Performance
Improve performance on modern systems:
fsutil behavior set Disable8dot3 1
Eliminates overhead of generating short filenames. Significant performance benefit on volumes with many files.
Create Symbolic Junction Points
Advanced linking for directory redirection (requires elevated privileges):
fsutil reparsepoint query C:\Junction
Query reparse points (junctions, symbolic links). Use with mklink for creating directory links.
Database Pre-Allocation
Pre-allocate database file space:
fsutil file createnew app_database.mdf 5368709120
fsutil file setvaliddata app_database.mdf 5368709120
Creates 5 GB database file with valid data length set. Prevents fragmentation from database growth.
Storage Tiering Analysis
Check file storage tier (Windows 8.1+):
fsutil tiering queryflags C:\path\to\file.txt
Verify if file is on SSD (fast tier) or HDD (capacity tier) in tiered storage systems.
System Administration Audit
Document NTFS behavior settings:
fsutil behavior query > ntfs_settings.txt
Capture filesystem configuration for documentation or comparison across systems.
Tips and Best Practices
Always Run as Administrator
Fsutil requires administrator privileges for almost all operations. Right-click Command Prompt → "Run as administrator" before using fsutil.
Test Before Production Use
Fsutil performs low-level operations. Test commands on non-critical systems or files first. Incorrect usage can cause data loss or system instability.
Use CreatenNew for Performance Testing
When creating test files, use fsutil file createnew instead of copying or generating data. It's instantaneous regardless of size and doesn't consume I/O bandwidth.
Disable Last Access for Servers
File servers benefit significantly from fsutil behavior set DisableLastAccess 1. Reduces write operations on heavily accessed servers.
Document Behavior Changes
Before modifying NTFS behavior settings, document current configuration: fsutil behavior query > before.txt. Allows rollback if issues occur.
Sparse Files for Large Datasets
Use sparse files for databases, VMs, or logs with large zero regions. Mark as sparse with fsutil sparse setflag to save disk space.
Hard Links Require Same Volume
Hard links only work within same NTFS volume. For cross-volume linking, use symbolic links (mklink) instead.
Monitor USN Journal Size
USN journal can grow large on busy systems. Query size regularly with fsutil usn queryjournal and adjust maximum size if needed.
Quota Enforcement Impacts Users
Before enabling quota enforcement (fsutil quota enforce), ensure quotas are appropriately sized. Enforcement prevents file creation when exceeded.
Check Volume Info for Compatibility
Use fsutil volume queryinfo to verify volume supports required features (sparse files, reparse points, quotas) before deploying applications.
Combine with Other Tools
Fsutil complements other commands: use with chkdsk for filesystem repair, compact for compression, diskpart for partition management.
Script Carefully
When scripting fsutil operations, add error checking. Failed operations may not produce obvious errors but can affect filesystem state.
Troubleshooting Common Issues
"Access is Denied" Error
Problem: Fsutil commands fail with access denied.
Cause: Insufficient privileges—fsutil requires administrator rights.
Solution:
- Close Command Prompt
- Right-click Command Prompt icon → "Run as administrator"
- Re-run fsutil command
Prevention: Always run Command Prompt as administrator when using fsutil.
"The Parameter is Incorrect" Error
Problem: Fsutil reports incorrect parameter.
Cause: Wrong syntax, invalid subcommand, or unsupported operation for filesystem.
Solution:
- Verify syntax:
fsutil <subcommand>without parameters shows usage - Check filesystem type: some features require NTFS (e.g., sparse files)
- Verify volume path format: use
C:notC:\
Prevention: Run fsutil <subcommand> to see valid options before using.
Createnew Fails with Large Sizes
Problem: Creating large files fails or system hangs.
Cause: Insufficient free space or attempting to create file larger than volume.
Solution:
- Check available space:
fsutil volume diskfree C: - Ensure free space exceeds desired file size
- For extremely large files (>1 TB), verify 64-bit OS and NTFS limits
Prevention: Always verify free space before creating large files.
Behavior Changes Don't Take Effect
Problem: Modified behavior settings with fsutil behavior set but no change observed.
Cause: Some settings require reboot to take effect.
Solution: Restart computer after changing behavior settings:
fsutil behavior set DisableLastAccess 1
shutdown /r /t 0
Prevention: Plan behavior changes during maintenance windows requiring restarts.
Sparse File Not Saving Space
Problem: File marked as sparse but disk space not freed.
Cause: File doesn't have zero-filled regions, or sparse ranges not set.
Solution:
- Check if file has zero regions:
fsutil sparse queryrange filename - Manually set sparse ranges:
fsutil sparse setrange filename offset length - Verify file system is NTFS (sparse files require NTFS)
Prevention: Sparse files only save space for zero-filled regions. Mark appropriate ranges as sparse.
USN Journal Operations Fail
Problem: USN journal commands fail or return errors.
Cause: Journal doesn't exist, corrupted, or volume doesn't support journals.
Solution:
- Check journal status:
fsutil usn queryjournal C: - If no journal exists, create:
fsutil usn createjournal m=33554432 a=4194304 C: - Verify volume is NTFS (FAT32 doesn't support USN journals)
Prevention: Create USN journals before applications expect them; document journal requirements.
Related Commands
chkdsk – File System Repair
chkdsk checks and repairs file system errors. Use chkdsk for filesystem integrity; use fsutil for querying and modifying filesystem behavior. Run chkdsk /f C: before advanced fsutil operations on suspect volumes.
diskpart – Disk Partitioning
diskpart manages partitions and volumes. Use diskpart for volume creation/deletion; use fsutil for querying volume properties and filesystem operations. Complementary tools for storage management.
compact – NTFS Compression
compact manages NTFS compression. Use fsutil volume queryinfo to verify compression support, then compact to enable compression on files/directories. Both work with NTFS features.
icacls – NTFS Permissions
icacls manages file/folder permissions. Use fsutil for filesystem internals; use icacls for security. Combine for comprehensive file system management.
mklink – Symbolic Links
mklink creates symbolic links and junctions. Use fsutil hardlink for hard links (same volume), mklink for symbolic links (can span volumes). Different link types for different scenarios.
wmic – Volume Information
wmic queries system information including disk details. Use wmic logicaldisk get for basic disk info; use fsutil volume for detailed NTFS-specific information.
Frequently Asked Questions
What does fsutil do in Windows?
The fsutil command performs advanced file system operations including creating files of specific sizes, managing sparse files, configuring NTFS behavior settings, querying volume information, and manipulating USN journals. Use fsutil file createnew file.txt 1000000 to create files, fsutil behavior query for settings, or fsutil volume diskfree C: for disk space details.
Do I need administrator privileges for fsutil?
Yes, almost all fsutil operations require administrator privileges. Right-click Command Prompt → "Run as administrator" before using fsutil. Attempting to run without elevation results in "Access is Denied" errors.
How do I create a large test file quickly?
Use fsutil file createnew filename.dat size_in_bytes. Example: fsutil file createnew testfile.dat 10737418240 creates a 10 GB file instantly. File is created without writing actual data, making it much faster than copying or generating content.
What is DisableLastAccess and should I change it?
DisableLastAccess controls whether NTFS updates the last-access timestamp when files are read. Value 1 (disabled) improves performance by eliminating writes on every file access. Recommended for file servers. Query with fsutil behavior query DisableLastAccess, set with fsutil behavior set DisableLastAccess 1.
What are sparse files and when should I use them?
Sparse files don't allocate disk space for zero-filled regions, saving storage. Use for database files, virtual machine disks, log files with gaps, or applications reserving large file sizes but using little space. Create with fsutil file createnew, then fsutil sparse setflag filename.
How do I check detailed disk space?
Use fsutil volume diskfree C: for precise byte-level disk space information. Shows total space, free space, and available free space (may differ due to quotas). More detailed than File Explorer or dir command.
What is a hard link and how do I create one?
A hard link is an additional directory entry for an existing file. Both names reference the same file data. Create with fsutil hardlink create newname.txt existingfile.txt. Hard links must be on same volume and cannot link directories.
Can fsutil damage my file system?
Yes, fsutil performs low-level operations that can corrupt data if used incorrectly. Always test commands on non-critical files first. Back up important data before modifying behavior settings or performing bulk operations. Most dangerous: volume dismount, setting sparse ranges on active files, deleting USN journals.
How do I improve NTFS performance with fsutil?
Three main optimizations: 1) Disable last access time updates (fsutil behavior set DisableLastAccess 1), 2) Disable 8.3 name generation on modern systems (fsutil behavior set Disable8dot3 1), 3) Adjust MFT zone reservation for volumes with many small files (fsutil behavior set MftZoneReservation 2 or 3). Reboot after changes.
What is the USN journal?
The USN (Update Sequence Number) journal tracks all file system changes (create, delete, modify, rename). Used by backup software, search indexing, and file synchronization tools. Query with fsutil usn queryjournal C:. Deleting journal breaks change-tracking applications.
Can I use fsutil on FAT32 volumes?
Limited functionality. Many fsutil features require NTFS: sparse files, hard links, USN journals, quotas, behavior settings. Basic operations like fsutil volume diskfree work on FAT32. Use fsutil fsinfo volumeinfo to check file system type.
How do I find all hard links to a file?
Use fsutil hardlink list C:\path\to\file.txt. Output shows all directory entries (hard links) pointing to the same file data. Useful for understanding file relationships and deduplication.
Quick Reference Card
| Command | Purpose | Example |
|---|---|---|
fsutil file createnew file 1000000 | Create file | 1 MB test file |
fsutil behavior query | NTFS settings | View all behaviors |
fsutil behavior set DisableLastAccess 1 | Disable last access | Performance boost |
fsutil volume diskfree C: | Disk space | Detailed free space |
fsutil volume queryinfo C: | Volume info | Filesystem capabilities |
fsutil hardlink create new.txt old.txt | Create hard link | Multiple names |
fsutil sparse setflag file.dat | Mark sparse | Save disk space |
fsutil usn queryjournal C: | USN journal | Change tracking |
fsutil quota query C: | Disk quotas | Per-user limits |
fsutil hardlink list file.txt | List hard links | Find all links |
fsutil file seteof file.txt 5000 | Set file size | Truncate/extend |
Try Fsutil in Our Simulator
Want to practice using the fsutil command without affecting your system? Try our interactive Windows Command Simulator to experiment with file system operations, behavior queries, and volume information in a safe, simulated environment. Practice command syntax, test various subcommands, and understand NTFS operations before running commands on your actual system.
For more file system commands, browse our comprehensive Commands Reference with over 200 Windows commands, syntax guides, and practical examples.
Summary
The fsutil command provides comprehensive low-level file system management capabilities for advanced NTFS operations, performance optimization, and storage administration directly from the Windows command line. By creating files of specific sizes, managing sparse files and hard links, configuring NTFS behavior settings, and querying detailed volume information, you can perform sophisticated file system operations unavailable through standard Windows tools.
Key takeaways: Use fsutil file createnew filename size to instantly create test files of any size for performance testing. Query NTFS settings with fsutil behavior query and optimize performance with DisableLastAccess and Disable8dot3 on appropriate systems. Get detailed disk space information with fsutil volume diskfree and comprehensive volume properties with fsutil volume queryinfo.
Create hard links with fsutil hardlink create for space-efficient file duplication (same volume only). Manage sparse files with fsutil sparse setflag to save disk space in database files, VM disks, or applications with large zero regions. Monitor file system changes via USN journal with fsutil usn queryjournal for auditing and troubleshooting.
For system administrators, fsutil is essential for file server performance optimization (disabling last access time updates), storage capacity planning (detailed space queries), quota management, and troubleshooting file system issues. Always run with administrator privileges, test operations on non-critical systems first, and document behavior changes for rollback capability.
Master the fsutil command to perform advanced NTFS operations, optimize file system performance, create efficient test environments, and troubleshoot complex storage issues—all through powerful command-line control of Windows file system internals.