Fsutil command sparse in Windows
Applies to : Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012. Windows 10, Windows 8.1, Windows 8, Windows Server 2008 R2, Windows 7.
The Fsutil sparse command manages sparse files (a sparse file is a type of computer file that tries to use the system space to be more efficient when the file is partially empty). To learn how to use this command, please see the example below.
The syntax of the Fsutil command is sparse
fsutil sparse [queryflag] fsutil sparse [queryrange] fsutil sparse [setflag] fsutil sparse [setrange]
Parameters
ParametersDescriptionqueryflag Sparse query. queryrange Scans a file and searches for ranges that may contain nonzero data (other data 0). setflag Marking a specified file is sparse. setrange Enter a range specified in a file by 0. Specify the full path to the file including the file name and extension, for example: C: documentsfilename.txt. Specify the offset in the file to mark it as sparse. Specifies the length of the area in the file to be marked as sparse (in bytes).Note
- A sparse file is a file that has one or more data areas that have not been allocated in it. A program will see these unallocated regions contain bytes of zero value, but these zeros do not use any disk space. All data with meaning or nonzero data is allocated, while all data has no meaning (large data series including 0s) are not allocated. When a sparse file is read, the allocated data returns as stored and the unallocated data is returned, by default, as zeroes (based on the specification of the claim. Secret C2). Sparse file support allows data to be allocated from anywhere in the file.
- In a sparse file, a large range of zeros may not require disk space allocation. Space for nonzero data will be allocated in case the file is recorded (if needed).
- The operating system recognizes files with ranges containing zeros only when they are compressed or sparse.
- If the file is sparse or compressed, NTFS can allocate disk space in the file. This sets the byte range to 0s without increasing the file size.
For example
To mark a file named Sample.txt in the C: Temp folder as sparse, enter:
fsutil sparse setflag c:tempsample.txt
See more:
- The Fsutil reparsepoint command in Windows
- Fsutil resource command in Windows
- Fsutil repair command in Windows
4 ★ | 32 Vote
You should read it
May be interested
- Fsutil hardlink command in Windowsthe fsutil hardlink command creates a hard link between an existing file and a new file.
- Fsutil resource command in Windowsthe fsutil resource command creates a secondary transactional resource manager, starts or stops transactional resource manager, or displays information about transactional resource manager.
- Sub-commands in nslookup Windows command (Part 2)nslookup set all command, nslookup set class, nslookup set d2, alias nslookup set debug, nslookup set domain, nslookup set port, and nslookup set querytype in windows
- Sub-commands in the nslookup Windows command (Part 1)nslookup command exit, finger nslookup, nslookup help, nslookup ls, nslookup lserver, nslookup root, commandlooklook server, nslookup set in windows
- Sub-commands in nslookup Windows command (Part 3)nslookup set recurse, nslookup set retry, nslookup set root, nslookup set search, nslookup set srchlist, nslookup set timeout, nslookup set type, nslookup set vc, and nslookup view in windows
- Command at in Windowsthe at command schedules commands and programs to run on a computer at a specified time with a specific date. you can only use the command at when schedule service is running.
- Set command in Windowsthe set command helps show, set or remove cmd.exe environment variables.
- Del command in Windowsthe del command deletes one or more files. this command is the same as the eraser command.
- 10 useful commands in Windows you should knowcommand prompt is used to execute batch files, perform tasks quickly, help you troubleshoot and solve some windows problems when the system crashes. however, not all commands in windows are useful and must be done regularly. with the 10 command lines in the following article it is very useful even if you are not an administrator.
- How to use the option equivalent to the 'ls' command in Windowsthe 'ls' command (note ls, not is) is one of the first terminal commands veterans teach to linux beginners.