Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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???
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?
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/
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.