Home » Infrastructure » Unix » Reduce size of log files
Reduce size of log files [message #97205] Thu, 17 January 2002 03:22 Go to next message
Michael Bailey
Messages: 8
Registered: February 2001
Junior Member
Hi, I have a few log files that are massive and I understand there is a way of reducing the size of them down to 0 without going into vi and removing a section of lines at a time. Does anyone know the command to do this?.

I'm using AIX.

Thanks,

Michael Bailey.
Re: Reduce size of log files [message #97207 is a reply to message #97205] Fri, 18 January 2002 13:58 Go to previous messageGo to next message
noel mendoza
Messages: 1
Registered: January 2002
Junior Member
Are you referring to the alert.log files? If so, just rename the current file. Oracle creates a new one for the next log entry.
Re: Reduce size of log files [message #97210 is a reply to message #97205] Sun, 20 January 2002 23:04 Go to previous messageGo to next message
Michael Bailey
Messages: 8
Registered: February 2001
Junior Member
It's not just the alert log files, I know how to do them but it's the log files whenever I do a system administration job using SMIT (it's a sys admin tool) and files like that. I understand a unix command exists that will empty the file without actually going into it and removing ever line but I can't seem to find this command.

Thanks, Michael Bailey.
Re: Reduce size of log files [message #97215 is a reply to message #97205] Tue, 22 January 2002 11:33 Go to previous messageGo to next message
Grant
Messages: 578
Registered: January 2002
Senior Member
The unix command to zero out a file and keep attributes is ">filename".
Re: Reduce size of log files [message #97218 is a reply to message #97205] Tue, 22 January 2002 22:50 Go to previous message
Michael Bailey
Messages: 8
Registered: February 2001
Junior Member
Thanks, that works a treat.
Previous Topic: Re: Installing Oracle 8.1.7 on Redhat Linux 7.1
Next Topic: Re: Installing Oracle 8.1.6 on Redhat Linux 7.1
Goto Forum:
  


Current Time: Fri Apr 19 13:34:23 CDT 2024