LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-31-2007, 02:06 AM   #16
cfaj
Member
 
Registered: Dec 2003
Location: Toronto, Canada
Distribution: Mint, Mandriva
Posts: 221

Rep: Reputation: 31

Quote:
Originally Posted by ntubski
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.


 
Old 03-31-2007, 02:11 AM   #17
cfaj
Member
 
Registered: Dec 2003
Location: Toronto, Canada
Distribution: Mint, Mandriva
Posts: 221

Rep: Reputation: 31
Quote:
Originally Posted by munna_dude
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:
Code:
pine -I "#,n,^M,^X,y" -subject "Cryptic ${puzzle}"\
    -attachlist ${puzzle}-Grid.tiff\
                ${puzzle}-Sol.tiff\
                ${puzzle}-Clues.txt\
             john@example.com
             jane@example.org
 
Old 03-31-2007, 05:30 AM   #18
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
thank you for quick replay

Quote:
Originally Posted by cfaj

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:
Code:
pine -I "#,n,^M,^X,y" -subject "Cryptic ${puzzle}"\
    -attachlist ${puzzle}-Grid.tiff\
                ${puzzle}-Sol.tiff\
                ${puzzle}-Clues.txt\
             john@example.com
             jane@example.org
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)

thank you in advance
 
Old 03-31-2007, 11:46 AM   #19
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Which distro are you using?

Gentoo: "emerge pine"
Fedora: "yum install -y pine"
Mandriva: "urpmi pine"
 
Old 03-31-2007, 11:50 AM   #20
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by munna_dude
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:
If you want to copy without entering a password, you should set up public key authentication, instructions here: http://www.linuxquestions.org/linux/...ation_with_ssh

Also you shouldn't use the root user over ssh.

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 ~]#

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)

thank you in advance
You need to install pine, yum install pine should work, I think.

Quote:
Originally Posted by cfaj

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.
The DNS record allows you to say scp FILE remote-host:, as opposed to scp FILE ##.##.##.##: right?
 
Old 03-31-2007, 11:55 AM   #21
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Quote:
Originally Posted by ntubski
The DNS record allows you to say scp FILE remote-host:, as opposed to scp FILE ##.##.##.##: right?
It should...I can't say for sure though; I've only ever used static hostname declarations in /etc/hosts.
 
Old 03-31-2007, 12:07 PM   #22
cfaj
Member
 
Registered: Dec 2003
Location: Toronto, Canada
Distribution: Mint, Mandriva
Posts: 221

Rep: Reputation: 31
Quote:
Originally Posted by munna_dude
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.

What e-mail client do you use?

If you want to do it through a script, it's a little more complicated. See this page for ideas: http://www.shelldorado.com/scripts/c...html#category8

 
Old 03-31-2007, 12:23 PM   #23
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

--- rod.
 
Old 04-01-2007, 11:12 PM   #24
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
thank you for quick replay

Quote:
Originally Posted by indienick
Which distro are you using?

Gentoo: "emerge pine"
Fedora: "yum install -y pine"
Mandriva: "urpmi pine"
i am using FEDORA5

[root@localhost ~]# yum install -y pine
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core [1/3]
core 100% |=========================| 1.1 kB 00:00
extras [2/3]
http://fr.rpmfind.net/linux/fedora/e...ta/repomd.xml: [Errno 14] HTTP Error 403: Connection: close
X-Category: InformationTechnology
Via: 1.1 Webcat-Skein-202.63.107.115 (skein/0.1.1)
Content-Type: text/html; charset=iso-8859-1
Server: Apache/2.0.52 (Red Hat)
Date: Mon, 02 Apr 2007 03:46:44 GMT
Content-Length: 448
Trying other mirror.
extras 100% |=========================| 1.1 kB 00:00
updates [3/3]
updates 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 1.4 MB 00:24
extras : ################################################## 4360/4360
Added 188 new packages, deleted 65 old in 7.33 seconds
primary.xml.gz 100% |=========================| 402 kB 00:07
updates : ################################################## 1162/1162
Added 120 new packages, deleted 57 old in 4.26 seconds
Parsing package install arguments
No Match for argument: pine
Nothing to do
[root@localhost ~]# pine
bash: pine: command not found
[root@localhost ~]#


it says like this..

what can i do to install pine

thank you in advance
 
Old 04-02-2007, 11:42 AM   #25
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Download the FC5 rpm for pine from http://rpm.livna.org/fedora/5/i386/p....lvn5.i386.rpm
Install it with rpm:
Code:
rpm -ihv pine-4.64-4.lvn5.i386.rpm
--- rod.
 
Old 04-02-2007, 11:22 PM   #26
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
thank you for quick replay

Quote:
Originally Posted by theNbomr
Download the FC5 rpm for pine from http://rpm.livna.org/fedora/5/i386/p....lvn5.i386.rpm
Install it with rpm:
Code:
rpm -ihv pine-4.64-4.lvn5.i386.rpm
--- rod.
i tried , and failed

[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

how can i do this

thank you in advance
 
Old 04-03-2007, 09:58 AM   #27
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

Last edited by theNbomr; 04-03-2007 at 10:08 AM.
 
Old 04-03-2007, 11:27 PM   #28
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
thank you for quick replay

Quote:
Originally Posted by theNbomr
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.

so, please can you help me in this way

thank you in advance
 
Old 04-03-2007, 11:54 PM   #29
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

--- rod.
 
Old 04-04-2007, 12:25 AM   #30
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
thank you for quick replay

Quote:
Originally Posted by theNbomr
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.

can you please help me in this way

thank you in advance
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
transfer dvds from ogg file to vod file kingfish217217 Linux - Software 3 02-19-2007 06:19 PM
File Transfer ~P3~ Linux - Newbie 2 05-19-2006 04:25 PM
File Transfer ~P3~ Linux - Laptop and Netbook 1 05-19-2006 09:53 AM
file transfer from vm phfowol Debian 3 10-23-2004 12:39 AM
File transfer Joe47 Linux - Newbie 2 02-09-2003 04:12 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:14 AM.

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