Path: utzoo!utgpu!attcan!uunet!husc6!cmcl2!brl-adm!adm!rbj@nav.icst.nbs.gov From: rbj@nav.icst.nbs.gov (Root Boy Jim) Newsgroups: comp.unix.questions Subject: Truncating an open file under BSD 4.3 Message-ID: <16651@brl-adm.ARPA> Date: 27 Jul 88 17:02:33 GMT Sender: news@brl-adm.ARPA Lines: 24 ? From: Badri Lokanathan ? What is the best way to empty an already open write-only file under BSD 4.3? Guy Harris answered most of your questions, so I won't repeat what he said... ? I tried truncate but it leaves holes in the file, which make ? it unreadable. ...but he didn't address this point. I find this hard to believe. Holes are supposed to be read as blocks of zeros. Maybe you tried to read after the truncate without changing the seek pointer? ? "We will fight for the right to be free {) badri@valhalla.ee.rochester.edu ? We will build our own society //\\ {ames,cmcl2,columbia,cornell, ? And we will sing, we will sing ///\\\ garp,harvard,ll-xn,rutgers}! ? We will sing our own song." -UB40 _||_ rochester!ur-valhalla!badri (Root Boy) Jim Cottrell National Bureau of Standards Flamer's Hotline: (301) 975-5688 The opinions expressed are solely my own and do not reflect NBS policy or agreement Careful with that VAX Eugene!