Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Nov 2001 11:33:23 -0600
From:      Mike Meyer <mwm@mired.org>
To:        francisv@dagupan.com
Cc:        questions@freebsd.org
Subject:   Re: Creating 5GB files
Message-ID:  <15353.16995.588419.688957@guru.mired.org>
In-Reply-To: <109894878@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
francisv@dagupan.com types:
> What's the 'right' way to create 5GB files using 'dd'? I'll be mounting the
> file as a virtual disk.

There isn't any one "right" way. Given that you've got 5GB of free
virtual, you could just do:

	dd if=/dev/zero of=my-big-file bs=5g count=1

However, it's probably better if you restrict your buffer size to
something that will fit in real memory. If that happens to be 5MB,
then you do it like so:

	dd if=/dev/zero of=my-big-file bs=5m count=1024

Just make sure that bs and count multiply to the size of the file you
want.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Q: How do you make the gods laugh?		A: Tell them your plans.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15353.16995.588419.688957>