LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-17-2007, 08:11 AM   #1
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Rep: Reputation: 30
file transfer


hi all
how can i transfer a file from one system to other
is there any possible way.
i am using F5 AMD
please help me

thank you in advance
 
Old 03-17-2007, 08:14 AM   #2
cfaj
Member
 
Registered: Dec 2003
Location: Toronto, Canada
Distribution: Mint, Mandriva
Posts: 221

Rep: Reputation: 31
Quote:
Originally Posted by munna_dude
hi all
how can i transfer a file from one system to other
is there any possible way.
i am using F5 AMD
Code:
scp FILE REMOTE:
Replace FILE with the path to the file you want to copy, and REMOTE with the system you want to copy it to.

Last edited by cfaj; 03-17-2007 at 11:39 AM.
 
Old 03-17-2007, 08:46 AM   #3
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

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

Quote:
Originally Posted by cfaj
[INDENT]
Code:
scp FILE REMOTE:
Replace FILE with the path to the file you want to copy, and REMOTE with the system you want to copy it to.
how can i use it in programatically.
and is there any file size problem to send.

i would like to send one.txt(of size 1mb) to other system through mailid

is it possible.
if yes how can i do it in programatically

thank you in advance
 
Old 03-23-2007, 06:29 AM   #4
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
hi all

i tried like this to send a file from one system to others
Code:
scp file1.txt userid@remote_box:
and also this
[CODE]
scp -rp /root/Desktop/html.txt remote:/root
[/CPDE]

This will take the file1.txt from the local system and put it in the home directory of userid of the remote system. For the "remote_box" you can use its IP or hostname.

but it is not working fine.

i would like to send via E-Mail from network.
how can i know userid of the remote system.

inplace of this i given ip address(that is known ip address)
it asking his/her password.

then how can i do.

i seen this in a software(file sending)
can i tell the name of the software.

please help me

thank you in advance
 
Old 03-23-2007, 11:01 AM   #5
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 haven't said what level of programming you want to use, so I will pick the middle ground and suggest perl. The Mail::Mailer Mail::Send modules in the MailTools package are probably a good place to start. See the docs on cpan.org.

--- rod.
 
Old 03-23-2007, 11:10 AM   #6
cfaj
Member
 
Registered: Dec 2003
Location: Toronto, Canada
Distribution: Mint, Mandriva
Posts: 221

Rep: Reputation: 31
Quote:
Originally Posted by munna_dude
hi all

i tried like this to send a file from one system to others
Code:
scp file1.txt userid@remote_box:
and also this
Code:
scp -rp /root/Desktop/html.txt remote:/root

Why are you using -r?
Code:
scp -p /root/Desktop/html.txt remote:/root
Quote:
This will take the file1.txt from the local system and put it in the home directory of userid of the remote system. For the "remote_box" you can use its IP or hostname.

but it is not working fine.

What does "not working fine" mean? What does happen? What output do you get from the command?

 
Old 03-23-2007, 11:23 PM   #7
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

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

Quote:
Originally Posted by cfaj
What does "not working fine" mean? What does happen? What output do you get from the command?

not working fine in the sense
it is asking ip address and his system password
this the problem
suppose i wanna send a file to u.
how can send?

i didnt know ur ip adress and also ur system password ...


please help me in this way

thank you in advance
 
Old 03-24-2007, 12:26 PM   #8
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
You have to have the remote system defined in your '/etc/hosts' file.

Example:
Code:
10.42.42.2     backupserver
192.168.2.59   mailserver
...            ...
IP      Hostname by which YOU would like to reference remote system by.
Quote:
Originally Posted by munna_dude
ot working fine in the sense
it is asking ip address and his system password
this the problem
suppose i wanna send a file to u.
how can send?

i didnt know ur ip adress and also ur system password ...


please help me in this way
SCP just makes use of creating secure sockets (SSL) over intranets (local networks). In theory, you could try doing it, but in North America, unless you have a business line, or pay X amount of dollars extra per month, you will always have a dynamic IP, and thus would mean you would have to re-edit your /etc/hosts file, or somehow obtain the other person's IP address everytime they reset their WAN connection.

The only feasable way to send somebody a file across the internet is by strictly using a DNS server that the remote host is catalogued on, and the remote host running SSH and/or FTP server daemons.

Either way, a static IP is required, or some unobtrusive way of refreshing your IP/host definitions upon every WAN re-connection.

Last edited by indienick; 03-24-2007 at 12:35 PM.
 
Old 03-24-2007, 02:18 PM   #9
cfaj
Member
 
Registered: Dec 2003
Location: Toronto, Canada
Distribution: Mint, Mandriva
Posts: 221

Rep: Reputation: 31
Quote:
Originally Posted by indienick
You have to have the remote system defined in your '/etc/hosts' file.

No, you don't; a URL will work.
Quote:
Example:
Code:
10.42.42.2     backupserver
192.168.2.59   mailserver
...            ...
IP      Hostname by which YOU would like to reference remote system by.
SCP just makes use of creating secure sockets (SSL) over intranets (local networks). In theory, you could try doing it, but in North America, unless you have a business line, or pay X amount of dollars extra per month, you will always have a dynamic IP, and thus would mean you would have to re-edit your /etc/hosts file, or somehow obtain the other person's IP address everytime they reset their WAN connection.

There is nothing preventing anyone from using scp to copy a file to any other machine, anywhere in the world. For example, I copy files from my home machine (in Toronto, Canada) to my website (in Texas, USA) with a line like this:
Code:
scp "$HOME/file.html" cfaj@freeshell.org:
For that to work, you either need the password or have host-key authentication set up.

If you don't have either of those, you could use anonymous FTP -- if the remote machine is set up to use it.

Failing that, send it by e-mail. There are many examples of how to send files by e-mail on the web (e.g., http://www.shelldorado.com/scripts/) and in Usenet newsgroups.
Quote:
The only feasable way to send somebody a file across the internet is by strictly using a DNS server that the remote host is catalogued on, and the remote host running SSH and/or FTP server daemons.

Either way, a static IP is required, or some unobtrusive way of refreshing your IP/host definitions upon every WAN re-connection.

There is absolutely no need for a static IP. You don't need to know the IP address.
 
Old 03-24-2007, 03:04 PM   #10
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Thank you for the corrections, cfaj.

I was under the impression static IPs were needed because anytime my DHCP server, at home, has to restart, I begrugdingly have to manually edit all of the /ets/hosts files on all of my other machines; simply typing in the hostname as a URL has yet to work for me.

 
Old 03-30-2007, 02:22 AM   #11
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

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

Quote:
Originally Posted by cfaj
There is absolutely no need for a static IP. You don't need to know the IP address.
then how can i do?
which way is the perfect to send through internet.

can you please help me

thank you in advance
 
Old 03-30-2007, 10:41 PM   #12
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

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

hi
somebudy advised me to use curl
it will work good for filr transfer through internet.
how can i use
is there any command line to send a file.

help me

thank you in advance
 
Old 03-30-2007, 10:52 PM   #13
cfaj
Member
 
Registered: Dec 2003
Location: Toronto, Canada
Distribution: Mint, Mandriva
Posts: 221

Rep: Reputation: 31
Quote:
Originally Posted by munna_dude
then how can i do?
which way is the perfect to send through internet.

Define "send through the internet". What are you trying to do? Where do you want to send a file?

You cannot send to a machine on which you have no permissions unless that machine allows you to, e.g., by anonymous FTP.

Some machines let you upload files through a web form.

If you want to send a file to a specific person on another machine, use e-mail.

If you have a shell account on the remote machine, use scp.

Etc., etc..
 
Old 03-30-2007, 11:25 PM   #14
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,774

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by cfaj

No, you don't; a URL will work.

There is nothing preventing anyone from using scp to copy a file to any other machine, anywhere in the world. For example, I copy files from my home machine (in Toronto, Canada) to my website (in Texas, USA) with a line like this:
Code:
scp "$HOME/file.html" cfaj@freeshell.org:
For that to work, you either need the password or have host-key authentication set up.
...
There is absolutely no need for a static IP. You don't need to know the IP address.
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.
 
Old 03-31-2007, 12:14 AM   #15
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 want to send a file to a specific person on another machine, use e-mail.

If you have a shell account on the remote machine, use scp.

Etc., etc..
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.

thank you in advance
 
  


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



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 03:07 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