Windows command Fsutil

Fsutil is a command-line utility that you can use to perform many FAT and NTFS file system related tasks, such as managing reparse points, managing sparse files, dismounting a volume, or extending a volume.

C:\windows\system32>fsutil
—- Commands Supported —-

8dot3name       8dot3name managment
behavior        Control file system behavior
dirty           Manage volume dirty bit
file            File specific commands
fsinfo          File system information
hardlink        Hardlink management
objectid        Object ID management
quota           Quota management
repair          Self healing management
reparsepoint    Reparse point management
resource        Transactional Resource Manager management
sparse          Sparse file control
transaction     Transaction management
usn             USN management
volume          Volume management

C:\windows\system32>fsutil fsinfo
—- FSINFO Commands Supported —-

drives          List all drives
drivetype       Query drive type for a drive
volumeinfo      Query volume information
ntfsinfo        Query NTFS specific volume information
statistics      Query file system statistics

Some examples
————-
Create a new file of a specific size(Arbitrary Size)

FSUTIL file createnew filename

C:\>fsutil file createnew test.txt 100
File C:\test.txt is created

possibly very large, with this utility is very easy to create a 10GB file, use the following:

fsutil file createnew bigfile.out 10737418240

Create a hardlink

FSUTIL hardlink create new_filename existing_filename

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

Set the zero data for a file

FSUTIL file setzerodata offset=val length=val filename

fsutil file setzerodata offset=100 length=150 C:\Temp\sample.txt

C:\windows\system32>fsutil fsinfo drives

Drives: C:\

C:\windows\system32>fsutil fsinfo drivetype c:
c: – Fixed Drive

C:\windows\system32>fsutil fsinfo statistics c:
File System Type :     NTFS

UserFileReads :        322574
UserFileReadBytes :    5475978240
UserDiskReads :        316161
UserFileWrites :       87461
UserFileWriteBytes :   4716495608
UserDiskWrites :       92814
MetaDataReads :        37771
MetaDataReadBytes :    411365376
MetaDataDiskReads :    54770
MetaDataWrites :       37664
MetaDataWriteBytes :   190550016
MetaDataDiskWrites :   48367

MftReads :             34323
MftReadBytes :         374571008
MftWrites :            24323
MftWriteBytes :        106967040
Mft2Writes :           0
Mft2WriteBytes :       0
RootIndexReads :       0
RootIndexReadBytes :   0
RootIndexWrites :      0
RootIndexWriteBytes :  0
BitmapReads :          23
BitmapReadBytes :      5316608
BitmapWrites :         10492
BitmapWriteBytes :     60985344
MftBitmapReads :       6
MftBitmapReadBytes :   24576
MftBitmapWrites :      1492
MftBitmapWriteBytes :  6963200
UserIndexReads :       19868
UserIndexReadBytes :   101777408
UserIndexWrites :      10613
UserIndexWriteBytes :  49397760
LogFileReads :         7
LogFileReadBytes :     28672
LogFileWrites :        46987
LogFileWriteBytes :    395644928
LogFileFull :          0

C:\windows\system32>

Reffer
https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fsutil.mspx?mfr=true
http://technet.microsoft.com/en-us/library/cc753059.aspx

Advertisements

Posted on July 2, 2014, in Windows. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: