Date: Wed, 9 Aug 2000 00:42:57 -0700 From: "Crist J . Clark" <cjclark@reflexnet.net> To: Tyler Spivey <tyler@wapvi.bc.ca> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: file enlarging/shrinking Message-ID: <20000809004257.A350@cjc-desktop.reflexcom.com> In-Reply-To: <200008090420.VAA05993@viper.wapvi.bc.ca>; from tyler@wapvi.bc.ca on Tue, Aug 08, 2000 at 09:20:05PM -0700 References: <200008090420.VAA05993@viper.wapvi.bc.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 08, 2000 at 09:20:05PM -0700, Tyler Spivey wrote: > this is a stupid questiiong here goes: > how do i make a file n bytes bigger, then when im does what i need to do shrink those bites off the end again? About a zillion different ways. Here are examples of each using dd(1). To create a file, "lenfile," <n> bytes long containing all zeros, % dd if=/dev/zero of=lenfile bs=1 count=<n> To add <m> bytes to the end, % dd if=/dev/zero bs=1 count=<m> >> lenfile To cut the file to an arbitrary length, <p>, % dd if=/dev/null of=lenfile bs=1 seek=<p> -- Crist J. Clark cjclark@alum.mit.com 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?20000809004257.A350>