LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-10-2004, 05:42 AM   #1
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Mail command


Hi there,

Is there a way to send a file to a user on the same system using the "mail" command? Can you use redirection? Would something like this work:

mail /home/twantrd/test.txt > twantrd@twantrd.com
(assuming twantrd.com has a proper mail server running).

Also, how would this same task be done in crontab? All in all, I can't find a way to use "mail" to send a file to a user. Thanks for any advice...

-twantrd
 
Old 01-10-2004, 07:33 AM   #2
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Rep: Reputation: 32
Hi mate

Quote:
Is there a way to send a file to a user on the same system using the "mail" command? Can you use redirection? Would something like this work:
try this below

cat your_file | mail your@mail_address.com

Please note must be in the same directory to send

TT

Last edited by tommytomato; 01-10-2004 at 07:35 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the MAIL command iatemyfingers Linux - Newbie 1 06-29-2005 11:56 AM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 06:06 PM
mail is not delivered thru the mail command aadilkhan Linux - General 1 11-18-2003 05:37 PM
cannot receive mail -- mail command andy18 Linux - General 1 09-09-2003 03:13 PM
Using the 'mail' command to mail a file Crashed_Again Linux - Software 2 08-08-2003 05:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:48 AM.

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