Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: olson@emerald.cybergate.com (Brian Olson)
Subject: How to portably truncate a file?
Date: 30 Mar 1995 00:27:34 GMT	[thread overview]
Message-ID: <3lcttm$csr@opal.cybergate.com> (raw)


Greeetings gurus,

I was asked a pretty simple Unix programming question the other day, 
and was suprised to realized that I didn't know the correct answer.
The question was:
	Is there a portable way in Unix to truncate an existing file 
to a smaller (but non-zero) length?

I know about the truncate() and ftruncate() functions introduced in
BSD4.2 or thereabouts, but these don't seem to be portable (for example,
System V Release 3.2 doesn't seem to support them).

Is there such a function that is portable?

Thanks in advance
Brian Olson
bolson@arcada.com




                 reply	other threads:[~1995-03-30  0:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox