用 fsutil 秒建任意大小的测试文件
瞬间生成一个几 GB 的空文件,用来测试拷贝速度、存储或网络传输。
运行 `fsutil file createnew D:\Test\testfile.bin 1073741824`,几秒钟即可创建一个 1GB 的测试文件。
01命令
命令
$ fsutil file createnew D:\Test\testfile.bin 107374182402作用说明
fsutil file createnew 会按指定字节数直接分配一个文件(1073741824 字节 = 1GB),因为不写入实际数据,所以再大的文件也是瞬间生成。它常用来测试文件夹传输、U盘写入速度,或观察程序处理大文件时的表现。
03风险
!注意: 生成的文件里没有有效数据,只适合做容量和速度测试,不能当正常文件用。
04撤销
撤销
$ del D:\Test\testfile.bin05来源
- FSUtil — File system utilities依据: Includes the FILE CREATENEW command that creates a new file of a given size.
- fsutil file依据: Documents "fsutil file createnew <filename> <length>" which creates a file of the specified name and size.
最后验证: 2026-09-19 · 分类: 文件与文件夹