How to create a big file?

We wanted to do some benchmarks about file transfers between Israel and Singapore.
Here is my way to create a big file, using Octave (Matlab should work as well):

-bash-2.05b$ cat ./big.m
mat=ones(1,1000*1024*1024/8);
size(mat)
save -binary OneGig.dat mat

# here are a few examples:

-bash-2.05b$ ls -l
-rw-r--r-- 1 tel-zur tel-zur 1000M Jun 23 18:19 OneGig.dat

You are welcome to try, but hey! Give me a credit ok ? :)

Here is an update to this post (Nov.16,2006):
The method above can be called the "Physicist Way", Now I will describe the "Computer Geek Way", which is much more elegant of course:

dd if=/dev/zero of=one_gig_file bs=1M count=1000

That's it!

Comments

Popular posts from this blog

Cellular Automata - Part II, Using Condor

[mpich-discuss] Errors while testing MPICH2 on Vista

The End of Grid Computing?