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
bol...@arcada.com