From owner-freebsd-questions Wed Aug 9 0:45:24 2000 Delivered-To: freebsd-questions@freebsd.org Received: from 149.211.6.64.reflexcom.com (149.211.6.64.reflexcom.com [64.6.211.149]) by hub.freebsd.org (Postfix) with ESMTP id 99C0137B6EB for ; Wed, 9 Aug 2000 00:45:15 -0700 (PDT) (envelope-from cjc@149.211.6.64.reflexcom.com) Received: (from cjc@localhost) by cjc-desktop.reflexcom.com (8.9.3/8.9.3) id AAA00485; Wed, 9 Aug 2000 00:42:57 -0700 (PDT) (envelope-from cjc) Date: Wed, 9 Aug 2000 00:42:57 -0700 From: "Crist J . Clark" To: Tyler Spivey Cc: freebsd-questions@FreeBSD.ORG Subject: Re: file enlarging/shrinking Message-ID: <20000809004257.A350@cjc-desktop.reflexcom.com> Reply-To: cjclark@alum.mit.edu References: <200008090420.VAA05993@viper.wapvi.bc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200008090420.VAA05993@viper.wapvi.bc.ca>; from tyler@wapvi.bc.ca on Tue, Aug 08, 2000 at 09:20:05PM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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," bytes long containing all zeros, % dd if=/dev/zero of=lenfile bs=1 count= To add bytes to the end, % dd if=/dev/zero bs=1 count= >> lenfile To cut the file to an arbitrary length,

, % dd if=/dev/null of=lenfile bs=1 seek=

-- 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