• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 776
  • Last Modified:

Need help with Perl log file rotator

Need help with the following task.

In this objective we will create a log file rotator. First, create a fake log file in your home directory on the hottub called messages. This will be used to simulate the real /var/log/messages. Write a script called obj14-1.pl that checks for and creates these files:

messages
messages.1
messages.2
messages.3
messages.4

The first represents the current log file and the others are older versions. Each time the script runs it should check for the existence of messages.3 and, if it exists, move it to messages.4. Then is should check for messages.2 and move it to messages.3 and so on, until messages is moved to messages.1.


0
l1nuxxx
Asked:
l1nuxxx
1 Solution
 
Adam314Commented:
This sounds like a homework assignment.  Experts are not allowed to do your homework for you, but we can help.

What do you have so far?  
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now