Find the answer to your Linux question:
Results 1 to 2 of 2
Hi! Iam new to linux, appreciate your kind help. I have a web server running and its generating lot of logs daily. Currently, Iam manually zipping last 2 days log ...
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    7

    Script to zip old logs

    Hi!
    Iam new to linux, appreciate your kind help.
    I have a web server running and its generating lot of logs daily. Currently, Iam manually zipping last 2 days log files and moving them to a different folder called "old logs".

    Iam keeping them there for 5 days for any reference and eventually deleting them. Appreciate, someone can help me with a small script to automate this routine job.

    Thank you
    Hugo

  2. #2
    oz
    oz is online now
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,099
    Check out logrotate to see if it will suit your needs:

    logrotate
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...