Xref: utzoo comp.unix.xenix.sco:1214 comp.unix.shell:1157 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!tut.cis.ohio-state.edu!n8emr!uncle!donlash From: donlash@uncle.uucp (Donald Lashomb) Newsgroups: comp.unix.xenix.sco,comp.unix.shell Subject: Re: emptying a file and keeping its ownership Message-ID: <1990Dec31.120106.1947@uncle.uucp> Date: 31 Dec 90 12:01:06 GMT References: <1990Dec30.220722.29050@jarvis.csri.toronto.edu> Reply-To: donlash@uncle.UUCP (Donald Lashomb) Distribution: na Organization: U.N.C.L.E. Lines: 12 In article <1990Dec30.220722.29050@jarvis.csri.toronto.edu> ckchee@dgp.toronto.edu (Chuan Chee) writes: =I have SCO Xenix 2.2.3. What's the easiest way to "empty" a file =while keeping its ownership (owner,group) and access permissions the =same? Actually I only care about permissions (rw-rw-rw). =I would like this done in Bourne shell (or possibly CSH). =One other thing, this shell script is run under root. This works for me: > file # shell opens file for writing, and writes 0 bytes hope this is what you are looking for -Don