move big log files
Posted on 2002-07-21
I'm trying to write a perl script for my server to search for big(1.5GB) *.log files and move them to filename.log.1 and if such files exists to overwrite it.
So if a file error.log exists somewhere on my server and it reaches 1.5GB in size this script will move it to error.log.1 and file error.log would be gone or be empty.
I'm looking at seek() coomand but it can only search for files on specific file size how do i search for a *.log file of over 1.5GB?
If someone would write this complete script for me i'll give 200 points.
And only 100 points if you tell me what to use to accomplish this task.