home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!uunet.ca!geac!r-node!druid!darcy
- From: darcy@druid.uucp (D'Arcy J.M. Cain)
- Subject: Re: How to empty a file
- Message-ID: <1992Aug31.154104.14250@druid.uucp>
- Date: Mon, 31 Aug 1992 15:41:04 GMT
- References: <BtLLps.But@cs.dal.ca> <1992Aug28.051548.16935@ddsw1.mcs.com> <ahn.714982174@ac>
- Organization: D'Arcy Cain Consulting
- Lines: 14
-
- ahn@ac.wfunet.wfu.edu (Dave Ahn) writes:
- >Try 'touch logfile'
-
- That doesn't empty a file. It creates an empty one if a file of that name
- doesn't exist. You could do "rm file; touch file" but this is not only
- more complicated than necessary it also doesn't empty a file but rather
- it creates an empty file of the same name as the original - a subtle
- difference when links are involved.
-
- --
- D'Arcy J.M. Cain (darcy@druid.com) |
- D'Arcy Cain Consulting | There's no government
- Toronto, Ontario, Canada | like no government!
- +1 416 424 2871 DoD#0082 |
-