Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: BSD to SysV Message-ID: <32168@sun.uucp> Date: Wed, 28-Oct-87 01:58:29 EST Article-I.D.: sun.32168 Posted: Wed Oct 28 01:58:29 1987 Date-Received: Sat, 31-Oct-87 00:57:57 EST References: <9940@brl-adm.ARPA> <31892@sun.uucp> <1596@u1100a.UUCP> Sender: news@sun.uucp Lines: 10 > For efficiency, it would be better to "mv" the original file to one with a > new name, "creat" the original file, and copy the desired size from the > newly named file to the original. ...after, of course, doing an "fstat" on the original to make sure there's only one link to it. Otherwise, while it's faster than overwriting the original file, it's not equivalent to doing so or to doing an "ftruncate". Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com