"Not fast files. Good files quickly."
I've discovered a neat tool called spew for generating lots of output according to certain rules. It's very quick, but I don't have very many uses for it right now, especially on the Windows platform.
For starters, it's easy to make a 1MB file: spew 1m test.txt. Though that file may have been written in less than 1/10 of a second, it can have as many as 20 frags to it.
I wrote a quick little C# app called FastFileAlloc once that ignores this problem. You must always specify the exact bytesize of the intended file, but it will atomically write a single, non-zeroed, contiguous file of that intended size without a lot of hassle. FastFileAlloc test.txt 1048576 gets you the same thing as the spew command listed previously.
I'm considering right now whether or not to revamp FastFileAlloc to support naïve filesize abbreviation: "1M" and "16K" for example.
No comments:
Post a Comment