Created
September 24, 2015 01:12
-
-
Save hunj/98332de663fc6a6ca456 to your computer and use it in GitHub Desktop.
Generates a dummy file full of 0's and 1's up to desired size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DESIRED_SIZE = 1073741824 # 1gb | |
FILE_NAME = "dummy" # name of the dummy file | |
dummy_file = File.new(FILE_NAME, "w") | |
while dummy_file.size < DESIRED_SIZE | |
dummy_file.write([0,1].sample) | |
end | |
dummy_file.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment