Windows Commands: File and Volume commands, Hardlink management, Quota management, USN, Sparse file, Object ID and Reparse point management


FSUTIL-Windows Command

FSUTIL (Win XP/2003 server)

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>
    Eg : fsutil file createnew C:\testfile.txt 1000

Set the short name for a file

    FSUTIL file setshortname <filename> <shortname>
    Eg : fsutil file setshortname C:\testfile.txt testfile

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:

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
    FSUTIL dirty query <volume pathname>
    FSUTIL dirty set <volume pathname>

	Where option is one of:
		disable8dot3
		allowextchar
		disablelastaccess
		quotanotify
		mftzone
 
    Eg :  FSUTIL behavior query disable8dot3 1
          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

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
FSUTIL behavior query disable8dot3 1

If you have a lot of small files, you may 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), 3 = 37.5%, 4 = 50%

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

Other Windows 98, Windows XP Commands:
addusers , arp , assoc , associate , at , attrib , browstat , cacls , call , cd , change , chkdsk , chkntfs , choice , cipher , cleanmgr , clip , cmd , color , comp , con2prt , copy , date , defrag , del , delprof , dir , diruse , diskcomp , diskcopy , doskey , dsadd , dsmod , echo , endlocal , exit , expand , expand , fc , fdisk , find , findstr , for , forfiles , format , fsutil , ftp , ftype , global , goto , help , hfnetchk , if , ifmember , ipconfig , kill , label , ldifde , local , logevent , logoff , logtime , mapisend , md , mem , mode , monitor , more , mountvol , move , moveuser , msg , msiexec , msinfo32 , mstsc , munge , mv , nbtstat , net , netdom , netsh , netstat , netsvc , now , nslookup , ntbackup , ntrights , path , pathping , pause , perms , ping , popd , portqry , print , prncnfg , prnmngr , prompt , pushd , qgrep , rasdial , rasphone , rd , rdisk , recover , reg , regedit , regsvr32 , rem , ren , replace , rmtshare , robocopy , route , runas , rundll32 , sc , schtasks , sclist , scriptit , set , setlocal , setx , share , shift , shortcut , showgrps , showmbrs , shutdown , sleep , soon , sort , start , su , subinacl , subst , tasklist , time , timeout , title , touch , tracert , type , ver , verify , vol , where , whoami , windiff , winmsd , winmsdp , wmic , xcacls , xcopy ,
Live2Support.com :
Product - Benefits - Features - How Does it Works - Pricing - SSL Certificates - Signup - Contactus - Login - Submit Resources