emptying a file and keeping its ownership

Donald Lashomb donlash at uncle.uucp
Mon Dec 31 23:01:06 AEST 1990


In article <1990Dec30.220722.29050 at jarvis.csri.toronto.edu> ckchee at 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



More information about the Comp.unix.xenix.sco mailing list