LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2017, 06:45 AM   #1
kunal_777
LQ Newbie
 
Registered: May 2017
Posts: 6

Rep: Reputation: Disabled
Help me


How can i send any output from my linux machine to windows as an attachment via email.???
 
Old 06-08-2017, 06:47 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,490

Rep: Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532
what kind of os/desktop do you have? which email client do you prefer?
 
Old 06-08-2017, 06:53 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,316
Blog Entries: 13

Rep: Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372
Hi kunal_777 and welcome to LQ.

This thread as well as your other thread have both been started with difficult to answer questions.

By which I mean that you have asked a one liner, without giving much background information, or showed any indication of what you have tried.

Please take the time to review the Site FAQ for information about how to best ask a question.

As far as this question goes, you haven't indicated whether you are using email through a browser, what email server you are using, or whether you are using an email program as part of your Linux distribution.

Therefore a recommendation is to tell people here what Linux distribution you are using and how you are accessing email. From there, people can perhaps advise the actions you'd take to add an attachment to an email.

Sending it to Windows is not a thing, instead you would be sending it to yourself or another email account you have, as an attachment, and then reading that when you are logged into Windows.

And perhaps you have tried this but something went wrong and you either didn't see the attachment or it was not what you expected.

People cannot know these details until you update with better information.
 
3 members found this post helpful.
Old 06-08-2017, 07:08 AM   #4
kunal_777
LQ Newbie
 
Registered: May 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Hi kunal_777 and welcome to LQ.

This thread as well as your other thread have both been started with difficult to answer questions.

By which I mean that you have asked a one liner, without giving much background information, or showed any indication of what you have tried.

Please take the time to review the Site FAQ for information about how to best ask a question.

As far as this question goes, you haven't indicated whether you are using email through a browser, what email server you are using, or whether you are using an email program as part of your Linux distribution.

Therefore a recommendation is to tell people here what Linux distribution you are using and how you are accessing email. From there, people can perhaps advise the actions you'd take to add an attachment to an email.

Sending it to Windows is not a thing, instead you would be sending it to yourself or another email account you have, as an attachment, and then reading that when you are logged into Windows.

And perhaps you have tried this but something went wrong and you either didn't see the attachment or it was not what you expected.

People cannot know these details until you update with better information.
Thax for the reply nd yes i have not provided the correct info i am using sent os ver 6 and wanted to send history command o/p to my friend as he is using windows 7 via an email??? will this will work??? or should i provide more info???
 
Old 06-08-2017, 07:48 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,316
Blog Entries: 13

Rep: Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372
Quote:
Originally Posted by kunal_777 View Post
Thax for the reply nd yes i have not provided the correct info i am using sent os ver 6 and wanted to send history command o/p to my friend as he is using windows 7 via an email??? will this will work??? or should i provide more info???
Hi,

So you wish to capture history and send that to someone else? This seems to be your question (also related to your other thread).

First, have you been able to obtain the output you desired in preparation to send it? If not, then there are things like I/O re-directors which you should consider. For instance in the case of command line history, you can just type "history" and it outputs the command history to the terminal. To then capture that to a file, you type it as "history > output-file-name.txt", thus creating a file matching the name you've chosen.

Now you have a file, but you need to send it.

I submit that the easiest way to do this is to use your browser and do web-email much like you do with any other type of system, also because the interface is similar for all cases.

For instance I use gmail, and using a browser, I can go to gmail.com and log into my email And then that has to do with how to use gmail's web interface, which is largely the same between Windows and Linux, because you are using a browser. However when you compose and email, there's an option to add an attachment where it pops up an Open File dialogue and allows you to select the attachment. As far as where it is, it is in the location in the file system, the directory where you were, when you did that former history command using the > I/O redirect.

One possible follow-on question is whether or not you understand the directory structure of the system you are using, so as to be able to understand how to find the file to perform the attachment.

Thus, which, if any part of this is a problem you do not understand how to transcend?
 
Old 06-08-2017, 08:47 AM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by kunal_777 View Post
Thax for the reply nd yes i have not provided the correct info i am using sent os ver 6 and wanted to send history command o/p to my friend as he is using windows 7 via an email??? will this will work??? or should i provide more info???
Send casual stuff using
Code:
echo just testing!  | nc termbin.com 9999
You get a link, send that to your friend.

Other usage examples:
Code:
cat ~/some_file.txt | nc termbin.com 9999
ls -la | nc termbin.com 9999
history | nc termbin.com 9999
You get a link, send that to your friend.

or chop up "history" (bash history?) using
Code:
history | <filter> | nc termbin.com 9999
You get a link, send that to your friend.

Quite flexible. Use Caution with content.
Posts are cleaned every 30 days

Sole requirement on your end is netcat.
Sole requirement on their end is a Browser.
See http://termbin.com/

"Help me" subject is too vague (next time?)

Last edited by Habitual; 06-08-2017 at 08:49 AM.
 
Old 06-08-2017, 09:55 AM   #7
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237
Blog Entries: 2

Rep: Reputation: Disabled
I recommend using a Unix/Linux character based email program such as Alpine or Mutt, as you can whiz through your email much faster than you can with a GUI mailer (like Outlook or Thunderbird). Alpine is particular is intuitive to use and lets you send and receive email and attachments very easily. To send in an attachment in alpine you just type the /path/to/file on the Attchmnt: line.. You can redirect output of programs on the terminal by using the redirection symbols > and >>.. E.g. ls > myfile will redirect the output of ls to myfile.. Be careful with the > symbol as if the file already exists, it could be be replaced with the output of ls, so instead if you want can use >> to append the output to the existing file's contents.

Last edited by justmy2cents; 06-08-2017 at 09:58 AM.
 
Old 06-08-2017, 11:40 AM   #8
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 143Reputation: 143
If it's something you want automated, like some daily or weekly report, you can use Perl.
 
Old 06-08-2017, 12:27 PM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
http://www.dedoimedo.com/computers/u...mozTocId467639
 
Old 06-08-2017, 12:44 PM   #10
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
$ history 2>&1 | tee attachment_20170608.txt

$ cat attachment_20170608.txt

And use your favorite webmail client in a browser. Often a 10MB attachment size limit, but should work for history. Make sure you weren't doing anything you want to keep quiet in that history.

$ wget -c https://mylittlepony.hasbro.com/imag...rannysmith.png
 
Old 06-09-2017, 03:13 AM   #11
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,852

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Quote:
Originally Posted by Shadow_7 View Post
$ history 2>&1 | tee attachment_20170608.txt

$ cat attachment_20170608.txt

And use your favorite webmail client in a browser. Often a 10MB attachment size limit, but should work for history. Make sure you weren't doing anything you want to keep quiet in that history.

$ wget -c https://mylittlepony.hasbro.com/imag...rannysmith.png
agree with this, keeping a KISS method.

Open a browser, login to Gmail or any webmail client, Attached the text file and send the file. Voila!

Or upload it to Google Drive or Dropbox and send the link.

Last edited by JJJCR; 06-09-2017 at 03:13 AM. Reason: edit
 
Old 06-09-2017, 03:30 AM   #12
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,490

Rep: Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532
- or use a pendrive
 
Old 06-09-2017, 05:06 AM   #13
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,852

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Talking

Quote:
Originally Posted by pan64 View Post
- or use a pendrive
-or print the text file

-send the hard copy via postal mail or send via fax
 
Old 06-15-2017, 03:25 AM   #14
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 518
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
Or a homing pigeon. Or Morse code. Or Fire signals.

Relevant xkcd: https://xkcd.com/949/

https://imgs.xkcd.com/comics/file_transfer.png
 
Old 06-21-2017, 07:29 AM   #15
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by DJ Shaji View Post
Or a homing pigeon. Or Morse code. Or Fire signals.

Relevant xkcd: https://xkcd.com/949/
Hilarious. SneakerNet
https://xkcd.com/627/ for old school support technique.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:15 PM.

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