From: Robert Klemme Date: 2008-05-16T16:22:26+09:00 Subject: Re: Create an empty file of certain size 2008/5/16 Mark Dodwell : >> fd.truncate( 2 ** 20 ) > > Thanks that's great, didn't know about that method! If it does not work on your platform, you can speed up your solution by writing larger chunks: BUFFER = ("a" * 1024).freeze File.open("tmp.txt", 'wb') { |f| 10.kilobytes.times { f.write BUFFER } } Kind regards robert -- use.inject do |as, often| as.you_can - without end