*BSD News Article 11430


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA1850 ; Tue, 23 Feb 93 15:01:04 EST
Xref: sserve comp.unix.bsd:11486 comp.os.386bsd.development:1
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!think.com!enterpoop.mit.edu!ai-lab!hal.gnu.ai.mit.edu!mycroft
From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum)
Newsgroups: comp.unix.bsd,comp.os.386bsd.development
Subject: Re: [386BSD] truncating the beginning of a file
Followup-To: comp.os.386bsd.development
Date: 22 Feb 1993 01:05:11 GMT
Organization: /etc/organization
Lines: 31
Message-ID: <1m98s7INN275@life.ai.mit.edu>
References: <C2HKn4.Bry@sugar.neosoft.com> <1m0lejINNhpr@life.ai.mit.edu> <C2p13p.6Iw@sugar.neosoft.com>
NNTP-Posting-Host: hal.ai.mit.edu


[Note Followup-To: header.]

In article <C2p13p.6Iw@sugar.neosoft.com> peter@NeoSoft.com (Peter da
Silva) writes:
>
> In article <1m0lejINNhpr@life.ai.mit.edu> mycroft@hal.gnu.ai.mit.edu
> (Charles Hannum) writes:
>>
>> This is not what I had in mind.  I simply want to be able to chop
>> off the beginning of a file, like ftruncate() chops off the end.
>
> OK. One complication with this is, you can chop off any number of
> bytes at the end, but you'd have to chop off an even block count at
> the beginning.

This absolutely not the right thing.  As I already mentioned, my plan
is to use one of the `spare' fields in the inode to hold the offset of
the usable data within the allocated space.

>> I can think of several important applications which would benefit
>> greatly from this.
>
> Log files?

Yes, but even better, news.

-- 
 \  /   Charles Hannum, mycroft@ai.mit.edu
 /\ \   PGP public key available on request.  MIME, AMS, NextMail accepted.
Scheme  White heterosexual atheist male (WHAM) pride!