ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
But part of why that works is that freeshell.org has DNS setup. You can't just a connect a random machine to the internet, give it a random name and expect every computer in the world to know about that name automagically.
You cannot conect to a random machine with an IP address, either, unless it is set up to allow it.
The ability to send a file has nothing to do with the DNS record.
yes i would like send trough e-mail.
i would like send a file to my friend, who is in my database (server).
how can i do this.somebudy said , use curl and somebudy use scp
which way is the perfect.
can you please give me an example.
If you have shell access on the remote machine, use scp:
Code:
scp FILE remote-host:
If you need to send the file by e-mail, use your e-mail client. The method for doing that from the command line, or in a script, will depend on which e-mail client you use.
For example, I have this (with the e-mail addresses munged here) in a script:
If you have shell access on the remote machine, use scp:
Code:
scp FILE remote-host:
If you need to send the file by e-mail, use your e-mail client. The method for doing that from the command line, or in a script, will depend on which e-mail client you use.
For example, I have this (with the e-mail addresses munged here) in a script:
scp FILE remote-host:
i used this but it is asking ip address and password of others.
i did like this
[root@localhost ~]# scp -rp /root/Desktop/html.zip 192.168.1.120:/root
root@192.168.1.120's password:
and i tried with this
it says while using pine command in the terminal
[root@localhost ~]# pine
bash: pine: command not found
[root@localhost ~]# man pine
No manual entry for pine
[root@localhost ~]#
can you please help me
how can i send a file through internet by using my friends e-mail (i have his e-mail id in my database)
scp FILE remote-host:
i used this but it is asking ip address and password of others.
i did like this
[root@localhost ~]# scp -rp /root/Desktop/html.zip 192.168.1.120:/root
root@192.168.1.120's password:
scp FILE remote-host:
i used this but it is asking ip address and password of others.
i did like this
[root@localhost ~]# scp -rp /root/Desktop/html.zip 192.168.1.120:/root
root@192.168.1.120's password:
As it should.
I repeat: "If you have shell access on the remote machine,...".
If you don't, you cannot use scp.
Quote:
and i tried with this
it says while using pine command in the terminal
[root@localhost ~]# pine
bash: pine: command not found
[root@localhost ~]# man pine
No manual entry for pine
[root@localhost ~]#
I used pine as an example. If you don't have it installed, use another mail client, such as mutt.
Quote:
can you please help me
how can i send a file through internet by using my friends e-mail (i have his e-mail id in my database)
You don't use "your friends e-mail", you use your e-mail to send it to your friend's e-mail address.
munna_dude, your question is really not about file transfers, although that seems to be the question everyone wants to answer. You say you want to send someone a file, using e-mail. We presume you want to do this from the command line, since virtually all existing GUI e-mail clients are capable of sending files as attachments, and the world hardly needs yet another one of those and it doesn't sound like you are up to the task of writing one anyway, although you did say 'how can i use it in programmatically'.
Therefore, your options are to use some existing e-mail agent which has the capability to send an e-mail containing a specified attached file, as a shell command, or to write some kind of program or script that performs the same function. Someone else has already suggested that you use the well known program 'pine', and given you a perfectly good example of how to accomplish your goal, and has also explained in some detail how to get and install the program 'pine'.
Please go ahead and actually do that. If you still have problems, then come back here and ask specific questions with specific descriptions of what doesn't work. 'Doesn't work' or 'not working fine' does not include enough information for someone to be able to diagnose your problem, and offer useful suggestions.
If the suggestion of using pine is not acceptable, please state what it is about the suggestion to which you object.
[root@localhost Desktop]# rpm -ihv pine-4.64-4.lvn5.i386.rpm
warning: pine-4.64-4.lvn5.i386.rpm: Header V3 DSA signature: NOKEY, key ID a109b1ec
error: Failed dependencies:
libc-client.so.2006 is needed by pine-4.64-4.lvn5.i386
[root@localhost Desktop]#
can you please any otherways to send files from my system to other.
through e-mail in the sence not like mail-> attachment->send....
i am creating a gui. and i have my friend e-mail id or username.
with this i wanna send file range is 1kb to 10 gb (file size)
please help me in this way
i tried scp.
but it is asking ipaddress and password so, i stoped that.
some budy said that it is from curl
The rpm output tells you that you need to get libc-client.so.2006 Did you search for this, and attempt to install it? The library is at ftp://rpmfind.net/linux/fedora/extra...2.fc7.i386.rpm and it took me about 20 seconds to find it.
If you want to use a GUI to send e-mail, why don't you use one that already exists? In what programming language are you writing your GUI? The answer to this question will impact what answer(s) are meaningful. Are you sure you are up to the task of writing a functional GUI to do this?
You will have likely have problems sending 10Gb files as e-mail attachments, so you will have to break up the large files into smaller pieces, send each one as an attachment, and provide a tool for the recipient to re-assemble the pieces into the original format. Are you sure you want to do this? Keep in mind that the recipient's e-mail inbox may have a quota, and if so, that quota is quite possibly on the order of tens of megabytes, maybe less. I certainly know that anyone sending me a 10GB e-mail attachment will cause me substantial grief.
Here is the course I recommend for you: set up a web server, put your file(s) on the web server, and let the recipients download the files from there. If you want, you can create a script/program to generate e-mails containing links to the file(s), which the recipient can use to easily navigate to the files. These e-mails can contain HTML code to serve as the GUI component, if necessary.
Is this project expected to be a 'one-off' single-purpose application? If no, then you would be well advised to stick with a method that is general enough that most users will be able to use it without having to install and configure additional software (that you will have to write and support). Files served from a web server fits this description. If you are dealing with a counterpart user that has a fixed IP, and relatively stable host that supports an SSH server, why not get that host's IP and use a public key to set up password-less logins, so you can use scp to transfer your files?
I sense that you are making a much bigger issue out of this than it needs to be. There are already so many tools and methods already in existence, that are well thought out, stable, secure, and documented, that it behooves you to make use of one of them.
The rpm output tells you that you need to get libc-client.so.2006 Did you search for this, and attempt to install it? The library is at ftp://rpmfind.net/linux/fedora/extra...2.fc7.i386.rpm and it took me about 20 seconds to find it.
If you want to use a GUI to send e-mail, why don't you use one that already exists? In what programming language are you writing your GUI? The answer to this question will impact what answer(s) are meaningful. Are you sure you are up to the task of writing a functional GUI to do this?
You will have likely have problems sending 10Gb files as e-mail attachments, so you will have to break up the large files into smaller pieces, send each one as an attachment, and provide a tool for the recipient to re-assemble the pieces into the original format. Are you sure you want to do this? Keep in mind that the recipient's e-mail inbox may have a quota, and if so, that quota is quite possibly on the order of tens of megabytes, maybe less. I certainly know that anyone sending me a 10GB e-mail attachment will cause me substantial grief.
Here is the course I recommend for you: set up a web server, put your file(s) on the web server, and let the recipients download the files from there. If you want, you can create a script/program to generate e-mails containing links to the file(s), which the recipient can use to easily navigate to the files. These e-mails can contain HTML code to serve as the GUI component, if necessary.
Is this project expected to be a 'one-off' single-purpose application? If no, then you would be well advised to stick with a method that is general enough that most users will be able to use it without having to install and configure additional software (that you will have to write and support). Files served from a web server fits this description. If you are dealing with a counterpart user that has a fixed IP, and relatively stable host that supports an SSH server, why not get that host's IP and use a public key to set up password-less logins, so you can use scp to transfer your files?
I sense that you are making a much bigger issue out of this than it needs to be. There are already so many tools and methods already in existence, that are well thought out, stable, secure, and documented, that it behooves you to make use of one of them.
--- rod.
i am writing c programming using gtk
and am using Fedora5.
i am not doing like attachments etc...
i would like to send a file just like skype.
i am verymuch eager to know how they are sending files . the skype is able to send large files also. for that i created gui in c
now i have to do the backend process.
sorry for the name "skype" used here, only for understaning what i would like to do.
they are sending file like..
first we have to select a buddy(person in the contacts.).
and there is an option like send file....
it will opens some window, then select a file and send.
it is good.
then i have to create like this.(only file sending)
i completed the whole part of front end , only i strucked at file sending.
You will have to use the TCP sockets API. There is a good tutorial on that at Beej's Guide to Network Programming Using Internet Sockets. Your program will have to operate as both a client and a server, or you will have to write two seperate applications, one for each end. One end will listen for a connection (the server), and the client will open a connection to the server. The two will exchange information on who will send, and who will receive, file names, etc. Then, the file(s) will be exchanged, and the two ends will either drop the connections, or exchange more files.
You will need to know the IP of the peer node, in order to make the connection, which is a part that you objected to in earlier suggestions, however that is the only way connections are made through the internet.
You will undoubtedly have many questions on the implementation of this project. Ask when you bump into problems.
You will need to know the IP of the peer node, in order to make the connection, which is a part that you objected to in earlier suggestions, however that is the only way connections are made through the internet.
--- rod.
i have two doubts
how can i know IP of the peer node ?
throgh tcp can i send large files up to 10GB?
i think tcp sockets are used for instant messages.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.