From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,6705f4bf6f3c910a X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-09-17 00:55:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!server3.netnews.ja.net!jura.cc.ic.ac.uk!anahata.ma.ic.ac.uk!andy From: andy thomas Newsgroups: comp.unix.tru64 Subject: Re: Reducing The size of /var/adm/messages file Date: Tue, 17 Sep 2002 08:54:02 +0100 Organization: Imperial College, London, UK Message-ID: References: <%xwh9.9789$yt3.4718644@newssrv26.news.prodigy.com> Reply-To: andy.thomas@ic.ac.uk NNTP-Posting-Host: anahata.ma.ic.ac.uk Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: jura.cc.ic.ac.uk 1032249243 25886 155.198.192.57 (17 Sep 2002 07:54:03 GMT) X-Complaints-To: usenet@jura.cc.ic.ac.uk NNTP-Posting-Date: 17 Sep 2002 07:54:03 GMT X-X-Sender: andy@anahata.ma.ic.ac.uk In-Reply-To: <%xwh9.9789$yt3.4718644@newssrv26.news.prodigy.com> Xref: archiver1.google.com comp.unix.tru64:8666 On Tue, 17 Sep 2002, DS Group wrote: > To reduce the size of the /var/adm/messages file, can I just open it with vi > and delete some of the lines it contains? Or is there another way? Thanks. You could just do: cd /var/adm tail -100 messages > tmpfile cat tmpfile > messages This saves the last 100 lines while preserving the open /var/adm/messages file state. Andy