Re: vi editor question - thanks! one more
From: Lamar Saxon (Lamar.Saxon_at_AMERICREDIT.COM)
Date: 09/30/04
- Previous message: Green, Simon: "Re: vi editor question - thanks! one more"
- Maybe in reply to: Leyden, Joseph: "Re: vi editor question - thanks! one more"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Sep 2004 11:13:08 -0500 To: aix-l@Princeton.EDU
tail it to a temp file then overwrite the original with the temp file...
tail -n <# of lines you want to keep> hostmibd.log >
/tmp/hostmibd.log.tmp
cp /tmp/hostmibd.log.tmp /var/tmp/hostmibd.log
rm /tmp/hostmibd.log.tmp
Might look @ a package called TidySys on Bull's site that will do this
for you or possibly logrotate.
My concern is why the hostmibd log is so large. Should be rather small
if it is working...
Lamar
-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On
Behalf Of Leyden, Joseph
Sent: Thursday, September 30, 2004 11:00 AM
To: aix-l@Princeton.EDU
Subject: Re: vi editor question - thanks! one more
Thanks! that helped.
one more question,
Another file i wanted to shorten was:
/etc/var/hostmibd.log
but could not use vi bec "longer that 2048 char",
need to use existing (in-use) file to keep filesystem intact,
so how would you suggest I shorten it?
Joe
- Previous message: Green, Simon: "Re: vi editor question - thanks! one more"
- Maybe in reply to: Leyden, Joseph: "Re: vi editor question - thanks! one more"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|