From: Mark Dodwell Date: 2008-05-16T07:09:47+09:00 Subject: Create an empty file of certain size Hi, I need to create an empty (or at least garbage) file of a certain size. I'm doing it the way below, but it is rather slow -- any ideas on a quicker way? File.open("tmp.txt", 'w') { |f| 10.megabytes.times { f.write "a" } } Thanks! ~ Mark -- Posted via http://www.ruby-forum.com/.