Computing.Net > Forums > Unix > Script to gzip logfiles

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Script to gzip logfiles

Reply to Message Icon

Name: sunsysadm2003
Date: April 25, 2006 at 11:12:29 Pacific
OS: Solaris 8
CPU/Ram: N/A
Product: N/A
Comment:

I need some shell scripting help please. I have an environment whereby the application is performing log rotation automatically. I would like to gzip one month's worth of logs at a time for review and then have the oldest gzipped log archive deleted after say one or two months. The log files have the following format:
TLG_env1_errorlog.2005-10-25
TLG_env1_errorlog.2005-10-26
TLG_env1_errorlog.2005-10-27
TLG_env1_errorlog.2005-10-28
.....
I have tried googling for a script since scripting is not my strong point. Any help would be appreciated.



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Script to gzip logfiles

shell script to find & get the specific file www.computing.net/answers/unix/shell-script-to-find-get-the-specific-file/8415.html

Script to delete old files www.computing.net/answers/unix/script-to-delete-old-files/4094.html

Script to send email if Unix reboot www.computing.net/answers/unix/script-to-send-email-if-unix-reboot/4576.html