From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <7120ecbe8d685456cf35dc5578209eca@orthanc.cc.titech.ac.jp> To: 9fans@cse.psu.edu From: YAMANASHI Takeshi Date: Fri, 15 Oct 2004 09:29:49 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] how to truncate a file? Topicbox-Message-UUID: ee86ca62-eacd-11e9-9e20-41e7f4b1d025 Is there an idiom for truncationg a file in Plan 9? I'm suspecting it's not easy because APE ftruncate is written as: /sys/src/ape/lib/ap/plan9/ftruncate.c int ftruncate(int fd, off_t length) { errno = EINVAL; return -1; } There is OTRUNC mode, but I would like to chop off a file from a certain position to the end of the file. --