LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 01-17-2009, 09:30 AM   #1
edpatterson
LQ Newbie
 
Registered: Aug 2003
Location: Florida
Distribution: Ubuntu
Posts: 13

Rep: Reputation: 1
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
 
Old 01-17-2009, 10:28 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
This is a duplicate thread. I'm reporting it for removal.
 
Old 01-17-2009, 10:40 AM   #3
edpatterson
LQ Newbie
 
Registered: Aug 2003
Location: Florida
Distribution: Ubuntu
Posts: 13

Original Poster
Rep: Reputation: 1
Thanks, I tried to figure out how to delete it.. When I clicked post Firefox went on a mission for God. When I came back to check the process there were 2 posts.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Split large file in several files using scripting (awk etc.) chipix Programming 14 10-29-2007 11:16 AM
determine encoding type of a file (ie - UTF-8) chovy Linux - Software 1 04-03-2006 12:46 AM
Compress and split a big sized file into smaller files hicham007 Programming 3 07-28-2005 08:56 PM
How do I determine file system type? lowpro2k3 Linux - General 5 07-09-2005 03:40 PM
How does KDE determine file type? vdemuth Linux - Software 4 01-08-2005 04:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration