Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 14th, 2001, 11:51 AM
randor randor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Western New York
Posts: 85 randor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 8 m 46 sec
Reputation Power: 8
Send a message via Yahoo to randor
crontab log removal

hello,

i know that this is not the correct forum, but i am not sure where to put a crontab question, so i came
here.

my question is probably very easy for those of you that use crontabs:

i want to remove my logs once a day, i found this in a tutorial:

45 23 * * * /usr/local/bin/vnukelog

but i am not sure if this is a standard way of doing this, or if i have to edit it to fit into my server,
and if so, what should i be putting where?

thanks for any help..

Reply With Quote
  #2  
Old June 14th, 2001, 02:53 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> my question is probably very easy for those of you that use crontabs

The syntax of your crontab is correct (Running a daily job at 23:45PM). In fact, your question really has nothing to do with crontab.

>> i want to remove my logs once a day

Why you wanted to remove it? You should rotate it instead. man 8 newsyslog. If you are worrying about those already rotated logs like messages.0.gz, you can run a cron to recombine and remove it. Like writing a script that will zcat the content of messages0.gz and place it to another file like /var/private/messages/messages_log, then delete the messages.0.gz on exit. Yes, your /var/private/messags/messages_log may accumulate to be very large file. What I would do is to run another cron to post-process this message_log and remove unwanted entries and preformat it and insert into a database.

Anyhow, read up the manpage of newsyslog, maybe that's what you really wanted to do.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > crontab log removal


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway