Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Oct 2002 00:37:42 -0700
From:      Kris Kennaway <kris@obsecurity.org>
To:        shubha mr <shubha_mr@yahoo.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: file of large size
Message-ID:  <20021002073742.GA65946@xor.obsecurity.org>
In-Reply-To: <20021002072517.28439.qmail@web14611.mail.yahoo.com>
References:  <20021002072517.28439.qmail@web14611.mail.yahoo.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Wed, Oct 02, 2002 at 08:25:17AM +0100, shubha mr wrote:
> Hi,
> Can anyone suggest me a shell script or a command to
> create a large file in BSD(aroung 50 MB).Any junk data
> in it is also fine.

truncate -s 50M /path/to/file

This creates a sparse file (i.e. it doesn't take up 50M of disk
space).  If you actually need space to be allocated, use dd(1).

Kris

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9mqJFWry0BWjoQKURAlCDAKDRgkIgkeAjlAYOhMSPV4R/FJhUTgCg/jBX
vEMKqbPJVI0PRmyIEOL7TU4=
=chtv
-----END PGP SIGNATURE-----
help

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