Manages sparse files A sparse file is a file with one or more regions of unallocated data in it. A program will see these unallocated regions as containing bytes with the value zero, but there is actually no disk space used to represent these zeros. In other words, all meaningful or nonzero data is allocated, whereas all non-meaningful data (large strings of data composed of zeros) is not allocated. When a sparse file is read, allocated data is returned as stored and unallocated data is returned, by default, as zeros, in accordance with the C2 security requirement specification. Sparse file support allows data to be de-allocated from anywhere in the file.
fsutil sparse [queryflag] PathName
fsutil sparse [queryrange] PathName
fsutil sparse [setflag] PathName
fsutil sparse [setrange] PathName BeginningOffset length
queryflag : Queries sparse.
queryrange : Scans a file looking for ranges that may contain nonzero data.
setflag : Marks the indicated file as sparse.
setrange : Fills a specified range of a file with zeroes.
PathName : Specifies the drive letter (followed by a colon), mount point, or volume name.
BeginningOffset : Offset within the file to mark as sparse.
length : Length of the region in the file to be marked as sparse, in bytes.
To mark a file as sparse, type:
fsutil sparse setflag C:\Temp\sample.txt