Scripting ?, determine file type, compress, split and email
Source Aventail log files
Destination my email account
I do not have directed access to the Aventail servers or this would be easy. Inside of /var/log/aventail there are 10 files, one each for the last 10 days. They follow the standard .0, .1, .2 format so I am assuming they are not compressed. I would rather not assume but check the file type using file then compress them into 2 meg gz files and have them mailed.
Does anyone have a generic script that does something close to this? I think I can figure it out if I am pointed in the right direction.
file to determine file type
gzip to compress the file(s) (assuming it have a length argument)
command line like blat to send the mail.
Repeat for each server, currently 5
Thanks,
Ed
|