Create Arbitrarily Sized Files In Less Than 15 Lines of Ruby
Posted: May 22nd, 2009 | Author: Jerod | Filed under: Ruby | Tags: io, lessthan15 | View CommentsOk, so I’m having fun with this “in less than 15 lines of Ruby” idea, but this time I turn my attention away from Twitter (I know, that’s hard to do right now) and toward file generation.
Sometimes you just need a 1GB file. Or a 350MB file. Or a 1MB file. It doesn’t matter what is in that file, but size does matter (heh).
With this little Ruby script, you can arbitrarily generate files of any size (using 1MB increments).
The Script:
Read the rest of this entry »