LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 09-08-2003, 09:20 AM   #1
ganninu
Member
 
Registered: Jul 2003
Distribution: RH 7.3/8.0/9.0, Debian Stable 3.0, FreeBSD 5.2, Solaris 8/9/10,HP-UX
Posts: 340

Rep: Reputation: 30
Question File transfer between two linux boxes in a LAN


Is there a quicker way than setting a samba/ftp server on one of the machines in order two transfer files between two linuces in the same LAN?
 
Old 09-08-2003, 09:45 AM   #2
rkwellstead
LQ Newbie
 
Registered: Aug 2003
Location: UK
Distribution: Slackware, Mandrake
Posts: 9

Rep: Reputation: 0
You can use nfs = Network File System, which is the Linux network file sharing equaivalent to windows file sharing (samba).

You will have to make sure that nfs is installed and working - which will vary according to your distro. When you have it installed and running, you simply add shares to /etc/exports file in the format:

/directory/to/share network/mask(options)

eg: /mnt/data 192.168.0.0/255.255.255.0(ro)

check 'man exports' for information on options. for now, ro = read only, rw = read write...

When you change a share in the /etc/exports file, run 'exportfs -r' probably as root, to reload the exports file. Then, from another machine on the network (in the allowed network/mask), use mount command to mount the nfs share like:

mount -t nfs remoteip:/directory/being/shared /local/directory

like the example above, eg: 'mount -t nfs 192.168.0.10:/mnt/data /mnt/nfs'

Hope that gets you on the right track...
 
Old 09-08-2003, 10:22 AM   #3
Medievalist
Member
 
Registered: Aug 2003
Distribution: Dead Rat
Posts: 175

Rep: Reputation: 37
Using NFS is like using a soft iron crowbar for a hammer. It'll work, but it's a lot of trouble....

Use SFTP to transfer files that you've never sent before. Use rsync over ssh (rsync --rsh="ssh -2" source destination) to synchronize files that already exist on both hosts very rapidly.

Rsync is worth learning. SSH/SFTP even more so.
 
Old 09-08-2003, 10:46 AM   #4
rkwellstead
LQ Newbie
 
Registered: Aug 2003
Location: UK
Distribution: Slackware, Mandrake
Posts: 9

Rep: Reputation: 0
Ok, i was thinking of more permanent connections, like Samba/Windows shares, since that was mentioned in the original question... For less often transfers, i use scp, part of ssh package... why use rsync over ssh?

Richard
 
Old 09-08-2003, 11:12 AM   #5
Medievalist
Member
 
Registered: Aug 2003
Distribution: Dead Rat
Posts: 175

Rep: Reputation: 37
I use rsync in my backup scheme to synchronize the contents of over 20,000 directories; including the home directories and email spools of 400+ users and ten departments.

It takes less than an hour.

Fast enough? The tarballs take nearly 14 hours to make after the rsyncs are done.

Scp is SSH version 1. It's a replacement for the dreaded Berkeley rcp.

SFTP uses SSH version 2 and also comes with your SSH package. It's a replacement for FTP.

Rsync is designed to use the equally dreaded and fundamentally evil Berkeley rsh, but it can use ssh instead.

If you are already supporting samba, and haven't any need for speed or security, use smbclient. If you don't mind having another protocol engine to support, use NFS or Coda. If you want raw speed and power with hard-core security, use SFTP or rsync-over-ssh.
 
Old 09-09-2003, 10:04 AM   #6
rkwellstead
LQ Newbie
 
Registered: Aug 2003
Location: UK
Distribution: Slackware, Mandrake
Posts: 9

Rep: Reputation: 0
Hehe... I never heard of sftp before - thanks for telling me... It rocks... well, compared to scp.

Richard
 
Old 09-09-2003, 10:37 AM   #7
Medievalist
Member
 
Registered: Aug 2003
Distribution: Dead Rat
Posts: 175

Rep: Reputation: 37
If you want to help support forther development, buy a T-shirt from http://openssh.org/
 
  


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
How to do file transfer in linux pspandu Linux - General 7 09-12-2006 02:09 AM
Need to transfer a file between 2 linux boxes DeadPenguin Linux - Newbie 16 06-23-2005 08:55 AM
Linux gateway on a LAN and the rest of the boxes are XP MR_UNO Linux - Networking 12 12-02-2004 02:20 AM
File Transfer from XP to Linux e11 Linux - Newbie 8 11-06-2004 11:17 AM
how to share linux files on LAN btwn other linux boxes shakeeb Linux - Networking 9 02-04-2004 02:10 PM


All times are GMT -5. The time now is 07:08 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration