home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!pacbell!oracle!unrepliable!bounce
- Newsgroups: comp.unix.shell
- From: plobo@dvlseq.us.oracle.com (Patrick Lobo)
- Subject: Re: How to empty a file
- Message-ID: <1992Aug29.014925.20596@oracle.us.oracle.com>
- Sender: usenet@oracle.us.oracle.com (Oracle News Poster)
- Nntp-Posting-Host: dvlseq
- Organization: Oracle World HQ, Redwood Shores, California
- References: <BtLLps.But@cs.dal.ca> <1992Aug28.051548.16935@ddsw1.mcs.com> <ahn.714982174@ac>
- Date: Sat, 29 Aug 1992 01:49:25 GMT
- X-Disclaimer: This message was written by an unauthenticated user
- at Oracle Corporation. The opinions expressed are those
- of the user and not necessarily those of Oracle.
- Lines: 22
-
- In article <ahn.714982174@ac> ahn@ac.wfunet.wfu.edu (Dave Ahn) writes:
- >dattier@ddsw1.mcs.com (David W. Tamkin) writes:
- >
- >>digdon@ug.cs.dal.ca (Mike Digdon) wrote in <BtLLps.But@cs.dal.ca>:
- >
- >>| You could also do:
- >>|
- >>| echo > logfile
- >
- >>That will not leave an empty file; the file will contain one newline and
- >>nothing else, but it won't be empty.
- >
- >Try 'touch logfile'
- >--
- >Dave Ahn
-
-
- Touch won't work in this case, because the logfile already exists and
- is of finite size. The user wants to truncate a pre-existing file to zero
- length.
-
- pl
-