Thomas Sampson

Creating Empty Files of Arbitrary Size

Leave a comment

Today I required the ability to create an empty (zero filled) file of arbitrary size in order to entirely fill a memory stick. This was actually to ensure a full memory stick was handled correctly by the upcoming PSP Minis title BounceBack.

On Windows this process was incredibly easy and could be carried out using the command line utility fsutil.

fsutil file createnew myfile.bin 1024

On Linux/Unix the same can be achieved using dd.

dd if=/dev/zero of=myfile.bin bs=1024 count=1

Author: tomtech999

I have recently graduated with a 1st class degree in MComp Games Software Development at Sheffield Hallam University, focusing primarily on application development in C++, with experience in graphics programming, scripting languages, DVCS/VCS and web technology. In my spare time I enjoy Drumming, Reading and Snowboarding!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s