script to purge log files?

script to purge log files?

Post by Abdullah Ilya » Tue, 11 Feb 1997 04:00:00



Does any one have a script that could purge all the (not needed) log
files, and only keep the last months log,

how can i accomplish this task?

thanks for all the help


 
 
 

script to purge log files?

Post by Ed Rav » Thu, 13 Feb 1997 04:00:00



>Does any one have a script that could purge all the (not needed) log
>files, and only keep the last months log,

>how can i accomplish this task?

>thanks for all the help



Grab savelog.sh from a FreeBSD or Taylor UUCP distribution.
--
Ed Ravin        |If I were not a little mad and generally silly

                |I should show you in a moment how to grapple with the question
+1 212 678 5545 |And you'd really be astonished at the force of my suggestion.

 
 
 

script to purge log files?

Post by Tony Bloc » Fri, 14 Feb 1997 04:00:00



>  Does any one have a script that could purge all the (not needed) log
>  files, and only keep the last months log,

>  how can i accomplish this task?

>  thanks for all the help



Assuming you want to delete all files in directory except one, anmed KEEPER, try
this:

BYE=`ls|grep -v "KEEPER"
rm BYE

If other pattern matching might help, insert it after the ls:


HISTLOG

HTH

 
 
 

script to purge log files?

Post by dan.. » Fri, 14 Feb 1997 04:00:00




>>Does any one have a script that could purge all the (not needed) log
>>files, and only keep the last months log,

>>how can i accomplish this task?

>>thanks for all the help


>Grab savelog.sh from a FreeBSD or Taylor UUCP distribution.
>--
>Ed Ravin        |If I were not a little mad and generally silly

>                |I should show you in a moment how to grapple with the question
>+1 212 678 5545 |And you'd really be astonished at the force of my suggestion.

Or take a look at the skulker script included with AIX.  You can run it as a
regular cron entry.

This is my opinion ....

 
 
 

1. Log File Purging

I'm hoping that someone can confirm whether or not certain information
that I received from my Domain Host Provider is accurate.

My host has (what I feel) is a strange log file procedure. They trim the
beginning section of my log file every Monday morning. However, they
leave in any records that occured from the previous Saturday at
midnight.

I am trying to automate a procedure where to perform a log analysis for
my domains on a monthly bases. I initially thought that I might create
cron entries to copy the log file at certain intervals. I'm finding that
this is becoming cumbersome and more trouble than I think it should be.

I asked my IHP if my domains could be configured to purge on a monthly
basis only.

Their response was no.

Their hosting service offers a feature called WUSAGE which I don't use
anyway. It is updated weekly, therefore I assume that is why they trim
the log files weekly.

I'm not a unix or apache guy.

I would like to know if they refused because individual domains can't be
configured differently on a shared server or perhaps some other reason.

If anyone can explain, I would certainly appreciate it.

My domains are hosted on: Apache 1.2.6 over Red Hat Linux 4.2 based Dual
Pentium II 400mhz servers with 1GB of RAM

Thanks,
Tim Mallardi

2. Panic: assertion failed in SunOS 4.1.4

3. Problem using awk to purge lines from transaction log files

4. Silly little annoyance ... bad block?

5. Program to purge log files of Red Alert junk

6. scsi: 0 hosts/detected total

7. How to purge log files of all entries before a given date/time?

8. Screen lock vs. screen saver question...

9. repost: looking for software to purge "robot" hits from logs

10. syslog - how is /var/log/messages purged?

11. How can I split a log file into several log files?

12. wierd stuffs in proxy log file and back end server log file

13. Purging an 8MB .history file (tcsh)