LinuxQuestions.org
Help answer threads with 0 replies.
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 05-26-2005, 05:19 AM   #1
lazwaz
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Rep: Reputation: 0
Transfering file


Hi,
I have written a client server programs using rpcgen in linux.
I want to transfer a file from client to server.

How do i do it??

I dont want to use ftp or rftp
 
Old 05-26-2005, 05:34 PM   #2
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi Lazwaz,

I'm not sure about the exact meaning of your question. As you're writing some client server application, your question would be how to implement that file transfer on your application. Otherwise it would be how to transfer your client part to the client machine.

Assuming the second option, as you said you don't want to use ftp, there are several ways to transfer a file from one machine to another. All these options need rsh or ssh services and a known user on the remote host. Y also need rsh or ssh client on the local host. Here I define "local host" is the machine you are typing and "remote host" is the machine you want to talk to.
The latest and shiniest tool for transfer files is "rsync". It was developed and maintained by the samba team. It can work under rsh or ssh. If you have ssh, you can use "scp". If not, but has rsh, you can use "rcp". If you have rsh or ssh but does not have rsync, scp and rcp, you can use the old and ubiquitous "tar". Just start an archival session on the local side and pipe its output to [sr]sh to the remote side calling an unarchiving tar; see the examples:
Code:
rsync -azv --rsh=[rs]sh <local-directory> <remote-user>@<remote-computer>:<remote-directory>

(cd <local-directory>; tar c .) | ([rs]sh [-l <remote-user>] "cd <remote-directory>; tar xv)
Cheers,

Osvaldo.
 
  


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
File transfering mikejac69 LinuxQuestions.org Member Success Stories 5 08-25-2005 05:05 PM
Transfering Files webwally Linux - Networking 2 04-20-2005 06:17 AM
Transfering file between WinXP and FC2 NeoAndersn007 Linux - Hardware 6 08-15-2004 03:24 PM
Transfering my files unixfreak Linux - Newbie 1 08-11-2004 10:53 PM
transfering a 9gb file BigHead314 Linux - Networking 4 01-03-2004 06:51 PM

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

All times are GMT -5. The time now is 11:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration