How to send a directory through mail to many mailists

Hi all,

I need to send a mail to many malists with a directory as an attachment. Do we need to zip that dir for this? and I need to send in a good format(Body of the mail) that is in some a.txt file. How to do the same?

Can anyone please suggest?

---------- Post updated at 09:47 PM ---------- Previous update was at 04:55 AM ----------

Can anyone please help on my above query?

Regards,
Raghu.

Hi,

But I want to send a dir as an attachment, i did like below,

illindva$ tar -cvf test.zip test
illindva$ gzip test.zip
illindva$ ( cat msg.txt ; uuencode test.zip.gz test.zip.gz ) | mailx -s 'testing' mail@gmail.com

I got an attachment with the body ( msg.txt ), i did unzip the folder test.zip.gz in GUI. Then I got 'test' folder. But it is also showing in zip format. [ I've provided the screnshot of that file format]

Can anyone please suggest how to send dir? and how to get the files under that dir in GUI?

Thanks in advance.

Regards,
Raghu.

tar -cvf test.tar test
gzip test.tar

or by one line command:

tar cvf - test |gzip > test.tar.gz

Or if you have gtar

gtar zcvf test.tar.gz test