LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help me (https://www.linuxquestions.org/questions/linux-newbie-8/help-me-4175607526/)

kunal_777 06-08-2017 06:45 AM

Help me
 
How can i send any output from my linux machine to windows as an attachment via email.???

pan64 06-08-2017 06:47 AM

what kind of os/desktop do you have? which email client do you prefer?

rtmistler 06-08-2017 06:53 AM

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.

kunal_777 06-08-2017 07:08 AM

Quote:

Originally Posted by rtmistler (Post 5720447)
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???

rtmistler 06-08-2017 07:48 AM

Quote:

Originally Posted by kunal_777 (Post 5720450)
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?

Habitual 06-08-2017 08:47 AM

Quote:

Originally Posted by kunal_777 (Post 5720450)
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?) :)

justmy2cents 06-08-2017 09:55 AM

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.

Laserbeak 06-08-2017 11:40 AM

If it's something you want automated, like some daily or weekly report, you can use Perl.

Habitual 06-08-2017 12:27 PM

http://www.dedoimedo.com/computers/u...mozTocId467639

Shadow_7 06-08-2017 12:44 PM

$ 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

JJJCR 06-09-2017 03:13 AM

Quote:

Originally Posted by Shadow_7 (Post 5720589)
$ 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.

pan64 06-09-2017 03:30 AM

- or use a pendrive

JJJCR 06-09-2017 05:06 AM

Quote:

Originally Posted by pan64 (Post 5720862)
- or use a pendrive

-or print the text file

-send the hard copy via postal mail or send via fax :)

DJ Shaji 06-15-2017 03:25 AM

Or a homing pigeon. Or Morse code. Or Fire signals.

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

https://imgs.xkcd.com/comics/file_transfer.png

Habitual 06-21-2017 07:29 AM

Quote:

Originally Posted by DJ Shaji (Post 5722914)
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. :)


All times are GMT -5. The time now is 05:29 PM.