Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jul 2000 11:24:12 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>
To:        sheldonh@uunet.co.za (Sheldon Hearn)
Cc:        ben@scientia.demon.co.uk (Ben Smithurst), arch@FreeBSD.ORG
Subject:   Re: truncate(1) implementation details
Message-ID:  <200007031824.LAA13477@gndrsh.dnsmgr.net>
In-Reply-To: <32476.962635052@axl.ops.uunet.co.za> from Sheldon Hearn at "Jul 3, 2000 04:37:32 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 
> 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




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