Archive for 六月 18th, 2010

如何在Linux FreeBSD下生产巨大文件

星期五, 六月 18th, 2010

You can do that a few ways, with:

/dev/zero (very fast)
/dev/random
/dev/urandom (chunks of size you can decide in /proc/sys/kernel/random/pool_size)

A command like that:
Code:
time dd if=/dev/zero of=test.bin bs=1000000000 count=1

will generate a 1G file (and tell you how much time it took to do so).