AIX Tip of the Week

Subject: Mailing Files from AIX as Attachments

Audience: All

Date: May 9, 2006

You can use the following command to email files as attachments from AIX. I've found this to be useful for automating reports, and sending files to my PC.

Single mail attachment

uuencode x.gz x.gz | mailx -s x.gz

Multiple attachments in a single email

uuencode x.gz x.gz > mailfile
uuencode y.gz y.gz >> mailfile
uuencode z.gz z.gz >> mailfile
mail -s files See the "uuencode" man page for more information.

Bruce Spencer,

May 9, 2006