From owner-freebsd-arch Mon Jul 3 11:24:30 2000 Delivered-To: freebsd-arch@freebsd.org Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id 46B5537B717 for ; Mon, 3 Jul 2000 11:24:27 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id LAA13477; Mon, 3 Jul 2000 11:24:12 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <200007031824.LAA13477@gndrsh.dnsmgr.net> Subject: Re: truncate(1) implementation details In-Reply-To: <32476.962635052@axl.ops.uunet.co.za> from Sheldon Hearn at "Jul 3, 2000 04:37:32 pm" To: sheldonh@uunet.co.za (Sheldon Hearn) Date: Mon, 3 Jul 2000 11:24:12 -0700 (PDT) Cc: ben@scientia.demon.co.uk (Ben Smithurst), arch@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > On Mon, 03 Jul 2000 14:37:16 +0100, Ben Smithurst wrote: > > > I agree with alex that it should create files iff -c (or something) > > is given on the command line, and the default should be NOT to create > > anything. > > Cool. That seems to be agreed all around. I've seen conflict on the -c option, some say yes, some say no, so you can't have ``agreed all around'' :-) > So we've got: > > truncate [-cv] [+|-]size file [...] > -c Create files as necessary > -v Warn about attempts to truncate below zero bytes > > where + and - turn the size argument into a delta to be applied, rather > than an absolute size. > > Any objections to this interface? truncate(2) has no way to ``create'' a file, and thus truncate(1) should not either. Also -c has just the opposite meaning on the touch(1) command, probably leading to a POLA violation :-) -- Rod Grimes - KD7CAX @ CN85sl - (RWG25) rgrimes@gndrsh.dnsmgr.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message