Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!mips!pacbell.com!pacbell!sactoh0!jak From: jak@sactoh0.SAC.CA.US (Jay A. Konigsberg) Newsgroups: comp.unix.xenix.sco Subject: Re: emptying a file and keeping its ownership Message-ID: <4597@sactoh0.SAC.CA.US> Date: 5 Jan 91 18:28:55 GMT References: <1990Dec31.214030.7816@athena.mit.edu> <1991Jan1.040621.27634@NCoast.ORG> <187@raysnec.UUCP> Distribution: na Organization: Sacramento Public Access Unix, Sacramento, Ca. Lines: 26 In article <187@raysnec.UUCP> shwake@raysnec.UUCP (Ray Shwake) writes: >allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) writes: >> % echo > file >> % ls -s file >> 0 file > > Not quite. On the systems I know, echo outputs a new line character. >Thus your ostensibly zero'ed file would have a size of 1 byte. Well, I can think of three solutions: one: $ echo "\c" > file two: $ cp /dev/null file # or /dev/zero three: $ > file Choose ... -- ------------------------------------------------------------- Jay @ SAC-UNIX, Sacramento, Ca. UUCP=...pacbell!sactoh0!jak If something is worth doing, it's worth doing correctly.