Is there a (free) Windows commandline program to allocate (that is, reserve) arbitrary space in a NTFS filesystem to an arbitrary filename without actually writing to that space ?
1 Answer
If you don't actually want to use linux-style dd of=name_of_file seek=length_of_file bs=1 count=0
, which as far as I can tell should work the same on Windows as on any other POSIX-ish operating system, and should be available through e.g. msys2, or as dd for windows, try:
fsutil file createnew name_of_file size_of_file
I think should work. Don't have a Windows PC at the moment to test.
-
While the
dd
thing does not work on Linux the same asfallocate
does (dd
creates a sparse file with zerodu
usage), it does work on Windows (CygWin): It is quick (does not actually write), reduces free filesystem space and creates adu
usage as intended. This is what I prefer over thefsutil
command because it accepts human readable sizes like1G
whichfsutil
rejects.– JuergenCommented Nov 24, 2022 at 12:52