home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!usc!venice!gilmore
- From: gilmore@venice.sedd.trw.com (Larry Gilmore)
- Subject: Re: How to empty a file
- Message-ID: <1992Sep2.003609.9978@venice.sedd.trw.com>
- Organization: TRW Systems Engineering & Development Division, Carson, CA
- References: <1992Aug28.051548.16935@ddsw1.mcs.com> <ahn.714982174@ac> <1992Sep1.190410.17063@prism.poly.edu>
- Date: Wed, 2 Sep 1992 00:36:09 GMT
- Lines: 25
-
- In article <1992Sep1.190410.17063@prism.poly.edu> kapela@prism.poly.edu (Theodore S. Kapela) writes:
- >In article <ahn.714982174@ac> ahn@ac.wfunet.wfu.edu (Dave Ahn) writes:
- >>
- >>Try 'touch logfile'
- >
- >This will only leave an empty file if the file does not exist. If the file
- >exists, it will only change the access and modification times.
- >
- >
- >--
- >..............................................................................
- > Theodore S. Kapela kapela@poly.edu
- > Center for Applied Large-Scale Computing
- > Polytechnic University
-
- When I had to ensure a zero-length file, I used:
-
- cat /dev/null > foofile
-
-
- --
- Larry A. Gilmore Internet: gilmore@venice.sedd.trw.com
- TRW SEDD, DH1/2849
- P.O. Box 6213 Phone: (310)764-3318
- Carson, CA 90746 Fax: (310)764-3946
-