Quickly create large files for testing

Discussion in 'Guides' started by I_D, Feb 5, 2018.

  1. I_D

    I_D Member

    Joined:
    Aug 3, 2017
    Messages:
    73
    Likes Received:
    14
    Hope you guys don't mind me posting a guide I found -> here

    Sometimes you need a large file fast to test data transfers or disk performance.
    Windows includes a utility that allows you to quickly generate a file of any size instantly.
    Open an administrative level command prompt.

    Run the following command:
    Code:
    fsutil file createnew <file> <size in bytes>
    For example, this command will create a 1GB file called 1gb.test on my desktop:
    Code:
    fsutil file createnew c:\users\steve\desktop\1gb.test 1073741824
    The key is to input the size of the file in bytes so here are some common file sizes to save you from math:

    1 MB = 1048576 bytes

    100 MB = 104857600 bytes

    1 GB = 1073741824 bytes

    10 GB = 10737418240 bytes

    100 GB =107374182400 bytes

    1 TB = 1099511627776 bytes

    10 TB =10995116277760 bytes

    source
     
    #1
    jfeldt likes this.
  2. jfeldt

    jfeldt Member

    Joined:
    Jul 19, 2015
    Messages:
    43
    Likes Received:
    8
    Nice, thanks! In the past, I've always resorted to using dd on a unix system then transferring the files to a Windows system, this saves some time for cases when you don't care what the file is composed of.
     
    #2
  3. Stereodude

    Stereodude Active Member

    Joined:
    Feb 21, 2016
    Messages:
    372
    Likes Received:
    54
    But do you end up with an incompressible file or a compressible one?
     
    #3
  4. Deslok

    Deslok Active Member

    Joined:
    Jul 15, 2015
    Messages:
    823
    Likes Received:
    83
    fsutil creates empty files so they're compressible
     
    #4
  5. jfeldt

    jfeldt Member

    Joined:
    Jul 19, 2015
    Messages:
    43
    Likes Received:
    8
    Since a 1GB file is created essentially instantly, I figured it was empty, and when I use default 7-zip parameters, a 1GB file zips down to ~1.1MB, so yep.
     
    #5
  6. Deslok

    Deslok Active Member

    Joined:
    Jul 15, 2015
    Messages:
    823
    Likes Received:
    83
Similar Threads: Quickly create
Forum Title Date
Guides Create Custom Fan Speed Maps for SuperMicro X10 Servers via IPMI Apr 28, 2018
Guides Create a Proxmox VE 5.0 All-in-One with Docker Apr 19, 2017

Share This Page