How do I SHORTEN a file without rewriting it?

David Dick drd at siia.mv.com
Thu Nov 8 03:38:31 AEST 1990


In <747 at csource.oz.au> david at csource.oz.au (david nugent) writes:

>In <1162 at bilver.UUCP> alex at 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.

>Write zero bytes at that position.

Of course, this won't work on a UNIX system.



More information about the Comp.lang.c mailing list