write big file ruby

a = File.open(ARGV[0] || “big_file”, “w”)

a.seek 10_000_000_000 # 10G

a.write “hello”

a.close

 

though if your file system supports “sparse” files it may not actually take that space…

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.