Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

mail a file using mail utility

Posted on 2006-04-07
3
Medium Priority
?
463 Views
Last Modified: 2010-04-20
how to mail a file from /usr/local/asd.txt to the xyz@yahoo.com. I did something likes this
mail xyz@yahoo.com < /usr/local/asd.txt
is it right?
0
Comment
Question by:ajaypappan
  • 3
3 Comments
 
LVL 12

Accepted Solution

by:
paullamhkg earned 150 total points
ID: 16405928
if you wanna send as attachement try this

cat file | uuencode tgt_filname | mail -s "subject" xyz@yahoo.com
      ^                 ^
      |                 +--- attachment FILENAME for the target host to use
      +--- attachment CONTENT from the source host
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 16405937
"mail xyz@yahoo.com < /usr/local/asd.txt
is it right?"

this will make the content of asd.txt as the mail body and send an email to xyz@yahoo.com.

if you wanna to send like this with a suject, as the -s option.
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 16405939
sorry typo

add the -s option
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question