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>

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

--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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

--2oS5YaxWCcQjTEyO
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

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

--2oS5YaxWCcQjTEyO--

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?20021002073742.GA65946>