writing large files quickly

rbt rbt at athop1.ath.vt.edu
Fri Jan 27 14:10:48 EST 2006


I've been doing some file system benchmarking. In the process, I need to 
create a large file to copy around to various drives. I'm creating the 
file like this:

fd = file('large_file.bin', 'wb')
for x in xrange(409600000):
     fd.write('0')
fd.close()

This takes a few minutes to do. How can I speed up the process?

Thanks!



More information about the Python-list mailing list