如何在Linux上使用mail命令附加文件? [英] How to attach a file using mail command on Linux?

查看:206
本文介绍了如何在Linux上使用mail命令附加文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个运行Linux shell的服务器上。
我需要向收件人发送一个简单的文件。
如何做,只能使用邮件命令?



更新:获得了一个很好的解决方案,使用mutt:

  $ echo | mutt -a syslogs.tar.gz admin@domain.org 


解决方案

p>使用uuencode的示例:

  uuencode surfing.jpeg surfing.jpeg | mail sylvia@home.com 

和参考文章:



http://www.shelldorado.com/articles/mailattachments.html


I'm on a server running a Linux shell. I need to mail a simple file to a recipient. How to do this, prefereably using only the mail command?

UPDATE: got a good solution, using mutt instead:

$ echo | mutt -a syslogs.tar.gz admin@domain.org

解决方案

Example using uuencode:

uuencode surfing.jpeg surfing.jpeg | mail sylvia@home.com

and reference article:

http://www.shelldorado.com/articles/mailattachments.html

这篇关于如何在Linux上使用mail命令附加文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆