home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!linac!att!news.cs.indiana.edu!nstn.ns.ca!cs.dal.ca!ug.cs.dal.ca!digdon
- From: digdon@ug.cs.dal.ca (Mike Digdon)
- Subject: Re: How to empty a file
- Message-ID: <BtLLps.But@cs.dal.ca>
- Sender: usenet@cs.dal.ca (USENET News)
- Nntp-Posting-Host: ug.cs.dal.ca
- Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada
- References: <17g4kbINN4bm@seven-up.East.Sun.COM>
- Date: Wed, 26 Aug 1992 15:58:39 GMT
- Lines: 18
-
- In article <17g4kbINN4bm@seven-up.East.Sun.COM> ltaylor@blinky.East.Sun.COM writes:
- >
- >>> I'd like to empty a log file after extracting what I need from it so that
- >>> the next day's data can fill it up a-fresh. The file must exist after
- >>> emptying it.
- >
- >cp /dev/null <logfile>
- >
- >/laura
-
- You could also do:
-
- echo > logfile
-
- --
- Mike Digdon - Vice Prez DSCSS - Dalhousie University
- digdon@ug.cs.dal.ca -- Halifax, NS
- - Real programmers never work nine to five -
-