![](https://i-blog.csdnimg.cn/blog_migrate/f68d5a17b98d5aee4a43201d5c9a6f27.png)
If you want to see how fast your network really is, or test the speed between two hard drives, then you need files to do it. Today we’ll tell you how to create “dummy” files so you can perform such tests.
如果要查看网络的实际运行速度,或者测试两个硬盘之间的速度,则需要文件来完成。 今天,我们将告诉您如何创建“虚拟”文件,以便您可以执行此类测试。
Say you’ve installed a fast new solid state drive in your computer, and want to see how fast they really are. Or maybe you’ve finally upgrade your entire setup to gigabit ethernet or wireless AC, and you want to know how well it performs. Maybe you even want to compare the two.
假设您已在计算机中安装了快速的新固态驱动器,并希望了解它们的实际速度。 或者,也许您最终将整个设置升级到了千兆以太网或无线AC ,并且您想知道它的性能如何。 也许您甚至想比较两者。
The “theoretical” speeds on the box won’t really tell you how something performs in your home–you’ll need to test those transfer speeds yourself. To do so, you’ll need a file or files of the same size. Luckily, you can create dummy files of any size in Windows to serve this purpose–no extra software required.
包装盒上的“理论”速度并不能真正告诉您房屋中的性能如何,您需要自己测试一下这些传输速度。 为此,您需要一个或多个相同大小的文件。 幸运的是,您可以在Windows中创建任何大小的虚拟文件来实现此目的-无需额外的软件。
如何在Windows上创建虚拟文件 (How to Create Dummy Files on Windows)
All you need is to open a command line and type a few quick commands. It works in any version of Windows, too. Press the “Windows + R” key combination to open the Run window and then type “cmd”. Press OK.
您只需要打开命令行并输入一些快速命令即可。 它也可以在任何Windows版本中使用。 按“ Windows + R”组合键打开“运行”窗口,然后键入“ cmd”。 按确定。
![](https://i-blog.csdnimg.cn/blog_migrate/bdaba0747fe681520f095c6b69d0ec71.png)
With a command prompt open, you can start creating dummy files to your heart’s content. To do this, we’re going to use Fsutil.exe, which is a built-in file system tool that allows you to perform file system operations from the command line.
打开命令提示符后,您就可以开始创建虚拟文件了。 为此,我们将使用Fsutil.exe,这是一个内置的文件系统工具,可让您从命令行执行文件系统操作。
Here is the syntax we want to use for creating dummy files:
这是我们要用于创建虚拟文件的语法:
fsutil file createnew filename length
fsutil file createnew filename length
The length of the file needs to be in bytes, so if you’re unsure how to convert a large file into bytes, then here are the values you need to enter to actually obtain the sizes you might want:
文件的长度必须以字节为单位,因此,如果不确定如何将大文件转换为字节,则需要输入以下值才能实际获得所需的大小:
1 MB = 1048576 bytes
1 MB = 1048576字节
100 MB = 104857600 bytes
100 MB = 104857600字节
1 GB = 1073741824 bytes
1 GB = 1073741824字节
10 GB = 10737418240 bytes
10 GB = 10737418240字节
100 GB = 107374182400 bytes
100 GB = 107374182400字节
1 TB = 1099511627776 bytes
1 TB = 1099511627776字节
So, this is what we’ll use in our syntax for creating a 1 gigabyte dummy file:
因此,这就是我们将在语法中使用的内容,用于创建1 GB的虚拟文件:
fsutil file createnew fakefile.txt 1073741824
Just enter or copy-paste that text into your command line and hit “Enter” and your dummy file will be generated.
只需输入该文本或将其复制粘贴到命令行中,然后单击“ Enter”,就会生成您的虚拟文件。
Once we create our new dummy file, (entering the true byte value of 1 gigabyte), we can right-click and select “Properties” to see its size, which is exactly 1 GB.
创建新的虚拟文件(输入1 GB的真实字节值)后,我们可以右键单击并选择“属性”以查看其大小,即1 GB。
![](https://i-blog.csdnimg.cn/blog_migrate/62812f95427e57884819340cedae812e.png)
Of course, you might not be able to remember the exact byte size of one gigabtye or a terabtyte, but if you really need to, you can just refer to this article!
当然,您可能无法记住一个千兆字节或一个兆兆字节的确切字节大小,但是如果确实需要,您可以参考本文!
Now you can easily create dummy files of any size on your Windows PC–no more searching your computer for files of approximate sizes. With just a few key presses, you’ll be able to create exactly what you want and get the answers you need.
现在,您可以轻松地在Windows PC上创建任何大小的虚拟文件,而无需在计算机上搜索近似大小的文件。 只需按几下键,您就可以准确地创建所需的内容并获得所需的答案。
测试事情 (Testing Things Out)
Once you’ve created a dummy file, you can use it to test out transfer speeds for anything ranging from a simple USB flash drive to your fancy new home network.
创建虚拟文件后,您可以使用它来测试从简单的USB闪存驱动器到新的家庭网络等各种类型的传输速度。
Testing transfer speeds with a dummy file is about as easy as you can imagine. For example, let’s say we want to test how long it takes to write a 10 gigabyte file to a flash drive over USB 2 versus USB 3. To do this, all we really need is a flash drive , a computer with both types of USB ports, and a stopwatch.
使用虚拟文件测试传输速度几乎可以想象到。 例如,假设我们要测试通过USB 2和USB 3将10 GB的文件写入闪存驱动器需要多长时间。为此,我们真正需要的是闪存驱动器,即同时具有两种USB类型的计算机端口和秒表。
We’re going to use a 10GB file because we’re more likely to see a difference in transfer times with a larger file than with a smaller one. With smaller files, the difference will be significantly less noticeable.
我们将使用10GB的文件,因为较大的文件比较小的文件更有可能看到传输时间的差异。 对于较小的文件,差异将不那么明显。
First plug the flash drive into a USB 2 port (they are black, while USB 3 ports are blue), then drop the file onto the drive and start the stopwatch as you do.
首先将闪存驱动器插入USB 2端口(它们为黑色,而USB 3端口为蓝色),然后将文件拖放到驱动器上,然后像启动秒表一样进行操作。
As you can see from the following screenshots, the difference to copy a 10 GB file to a flash drive over a USB 2 connection versus a USB 3 connection is quite significant. On the left is the USB 2 time, and on the right is the USB 3. The USB 3 transfer is over two full minutes faster than USB 2.
从以下屏幕截图中可以看到,通过USB 2连接和USB 3连接将10 GB文件复制到闪存驱动器的区别非常明显。 左侧是USB 2时间,右侧是USB3。USB3传输比USB 2快两整分钟。
![](https://i-blog.csdnimg.cn/blog_migrate/fa02bd4c57391f753a7c004c3bbb5c16.png)
You can repeat this test for any kind of transfers you desire. Feel free to test how long it takes to move a file from one computer on your network to another, to a cloud drive, or compare speeds between devices, such as how long it takes to transfer a file to one drive versus another.
您可以针对所需的任何传输方式重复此测试。 随意测试将文件从网络上的一台计算机移动到另一台计算机到云驱动器需要多长时间,或者比较设备之间的速度,例如将文件传输到一个驱动器与另一个驱动器之间需要多长时间。
There’s no limit to what you can test and time so if you’ve been wondering about the performance of your various devices, Internet connection, or network transfers, then create a dummy file and wonder no more.
测试内容和时间没有限制,因此,如果您一直在想各种设备的性能,Internet连接或网络传输,然后创建一个虚拟文件就不会再想了。