Xref: utzoo comp.lang.c:33110 comp.os.msdos.programmer:1632 Path: utzoo!attcan!uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!mintaka!olivea!samsung!xylogics!transfer!lectroid!atrain!bad From: bad@atrain.sw.stratus.com (Bruce Dumes) Newsgroups: comp.lang.c,comp.os.msdos.programmer Subject: Re: How do I SHORTEN a file without rewriting it? Keywords: truncation Message-ID: <2830@lectroid.sw.stratus.com> Date: 24 Oct 90 14:00:02 GMT References: <1162@bilver.UUCP> Sender: usenet@lectroid.sw.stratus.com Followup-To: comp.lang.c Organization: Stratus Computer, Inc. Lines: 16 In article <1162@bilver.UUCP> alex@bilver.UUCP (Alex Matulich) writes: > >Is there a way to shorten a file, that is, chop some data off the end of >it, so that it doesn't consume as much physical space on the disk? The >file I have is too big to read into memory and write back out again, and >there is not enough room on the disk to write out a temporary file. > Have you thought about using ftruncate()? Bruce -- Bruce Dumes | "You don't see many of *these* nowdays, | bad@zen.cac.stratus.com | do you?" |