Create a file with specific size

Reference

https://blog.atwork.at/post/Create-a-test-file-with-specific-size

Using the fsutil command line tool

fsutil file createnew .\10mb-testfile.txt 10485760

The file size is passed in bytes:

  • 1 MB: 1024*1024=1048576
  • 10MB: 1024*1024*10=10485760
  • 100MB: 1024*1024*100=104857600
  • 1GB: 1024*1024*1024=1073741824

在 WordPress.com 建立免費網站或網誌.

向上 ↑