Re: OT What would be the best script type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 29 June 2004 02:38 am, slim wrote:
> To do the following?
>
> I just got one of those fancy-dancy gmail accounts, and while I aint
> crazy about the email side of it, the one gig storage gave me an idea.
>
> what Id like to do, is make a script that will gather certain dir. and
> files for back up, split some tar.gz files at 9.8 meg each and email
> them to my gmail account... the gmail account has a 10 meg limit on a
> single message hence the need to split the file...
>
> I can think of a way to do this via php or perl but I was thinking a
> shell script would do it more efficiently... what do you all think?

That should not be too hard, certainly do-able with something like PHP. But in 
shell script, all you need would be the  following commands:

tar
gzip (maybe able to combine tar and gzip)
split 
mutt (to send file as attachment. I'm not sure if you can do it easily with 
'mail').

You may need to loop over the resulting pieces file from split, then call 
'mutt' inside the script.

I'd do it in PHP, since I know it better than shell (or bash), and just do 
system() or exex() for calling tar, gzip and split. Efficiency should not be 
a problem with PHP running in command line mode. 

RDB
-- 
Reuben D. Budiardja
Department of Physics and Astronomy
The University of Tennessee, Knoxville, TN
---------------------------------------------------------
"To be a nemesis, you have to actively try to destroy 
something, don't you? Really, I'm not out to destroy 
Microsoft. That will just be a completely unintentional 
side effect."
                 - Linus Torvalds -



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux