Discussion:
creating large files for testing
(too old to reply)
LOhit
2010-12-09 12:45:35 UTC
Permalink
Hello Everyone,

I apologize in advance if this question sounds stupid or has been answered
already. I need to create large dummy files for testing. I would like to
know if there is a way to do it using C on OpenBSD.

This is what I want to achieve. I tried looking for "mkfile" command, but I
couldn't find it either.

dd if=/dev/zero of=/testing/file0 bs=512 count=65536


Thanks in advance.
-LOhit
Guillaume Dualé
2010-12-09 13:12:25 UTC
Permalink
Post by LOhit
Hello Everyone,
I apologize in advance if this question sounds stupid or has been answered
already. I need to create large dummy files for testing. I would like to
know if there is a way to do it using C on OpenBSD.
This is what I want to achieve. I tried looking for "mkfile" command, but I
couldn't find it either.
dd if=/dev/zero of=/testing/file0 bs=512 count=65536
Thanks in advance.
-LOhit
Hi,
first link in Google :
http://bytes.com/topic/c/answers/733896-how-create-large-files-c

Guillaume.
LOhit
2010-12-09 13:18:01 UTC
Permalink
Thanks Guillaume. So, it was the former :)
Post by LOhit
Post by LOhit
Hello Everyone,
I apologize in advance if this question sounds stupid or has been
answered
Post by LOhit
already. I need to create large dummy files for testing. I would like to
know if there is a way to do it using C on OpenBSD.
This is what I want to achieve. I tried looking for "mkfile" command, but
I
Post by LOhit
couldn't find it either.
dd if=/dev/zero of=/testing/file0 bs=512 count=65536
Thanks in advance.
-LOhit
Hi,
http://bytes.com/topic/c/answers/733896-how-create-large-files-c
Guillaume.
Janne Johansson
2010-12-09 20:26:28 UTC
Permalink
Post by LOhit
Hello Everyone,
I apologize in advance if this question sounds stupid or has been answered
already. I need to create large dummy files for testing. I would like to
know if there is a way to do it using C on OpenBSD.
This is what I want to achieve. I tried looking for "mkfile" command, but I
couldn't find it either.
dd if=/dev/zero of=/testing/file0 bs=512 count=65536
dd if=/dev/zero of=/testing/file0 seek=1m count=1 bs=1
use seek=1024m for even larger files, and the best of it all, it
only takes a handful of bytes on disk, since it is sparse. Will still
read back zeros all the way if you "use" it later.
--
To our sweethearts and wives. May they never meet. -- 19th century toast
Continue reading on narkive:
Loading...