WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] file transfer by direct network cable between two laptops?  (Read 13009 times)

Offline nick65go

  • Hero Member
  • *****
  • Posts: 840
I have two laptops on my desktop, A and B; each booted by Tinycore 3.3, each with a normal NIC network interface card. They both work well; I wish a simple solution to transfer files between them, let say from /testA on laptop A, to /testB on laptop B; Now I am using an USB pen-drive, as an intermediary media; I wish to use just a network cable between them, no hub or router, no security is needed.

Please advise what software (tcz extension) to use on each laptop, and how to configure them, to have at least a unidirectional transfer, from A to B; Is it a complicated solution to have bidirectional transfer simultaneous?

Sorry, if the solution is in the forum, please show me the link;
Thank you very much. Nick

Edit: with two relative recent network cards, a normal cable is enough; then  tftpd service from TC base is a quick solution. Not necessary the best one; Topic is not closed...see Maro solution, like utilising the BusyBox applets of 'nc' and 'tar'
« Last Edit: December 06, 2010, 05:14:18 PM by nick65go »

Offline jonathanbrickman0000

  • Jr. Member
  • **
  • Posts: 71
    • PC TSC:  Easily turn a PC into a terminal server client
Re: file transfer by direct network cable between two laptops?
« Reply #1 on: December 04, 2010, 12:01:59 PM »
Do you want to transfer individual files on command?  Or whole directories of files, or directory trees?  Do you want real-time automatic synchronization?  Please be very specific.

J.E.B.

Offline nick65go

  • Hero Member
  • *****
  • Posts: 840
Re: file transfer by direct network cable between two laptops?
« Reply #2 on: December 04, 2010, 12:07:44 PM »
I want to transfer, from time to time, some files; not all directory, no synchronization; just to avoid USB media;

basically, I use my powerful laptop A for customizations, big screen, big RAM etc; then when all is OK, I will transfer some files from it to laptop B, an Atom CPU;

PS: ONLY if is it simple to use my router, solution is acceptable, but I do not wish traffic between the laptops to goes out in intranet, as my internet connection is limited at max 10GB/month (and the penalty for going over allowance is huge!); unplugging the telephone ADSL conncetion for outside is not good as my bandwidth is reseted to small value;

thanks;
« Last Edit: December 04, 2010, 02:09:38 PM by nick65go »

Offline jonathanbrickman0000

  • Jr. Member
  • **
  • Posts: 71
    • PC TSC:  Easily turn a PC into a terminal server client
Re: file transfer by direct network cable between two laptops?
« Reply #3 on: December 04, 2010, 02:11:37 PM »
It sounds like what you want is akin to an old-style PC-DOS laplink cable, and frankly, I don't think it exists, it would take quite a lot of work to build it up. 

Do you actually need a no-router/no-network configuration? 

J.E.B.


Offline nick65go

  • Hero Member
  • *****
  • Posts: 840
Re: file transfer by direct network cable between two laptops?
« Reply #4 on: December 04, 2010, 02:26:26 PM »
OK, router as central device and two PC solution details, please.
Advice to prevent, on my demand, traffic to go outside world temporary, just to stay INTRAnet;

router  with IP 192.168.1.254
laptop A, with IP 192.168.1.65
laptop B, with IP 192.168.1.66

ping from any laptop is OK, have quick response.
what CLI / GUI commnad to use to exchange files? what about need to have a firewall behind router?
« Last Edit: December 04, 2010, 02:36:37 PM by nick65go »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: file transfer by direct network cable between two laptops?
« Reply #5 on: December 04, 2010, 02:41:01 PM »
Your local lan traffic will not go out to the internet, so don't worry about it.

Offline jonathanbrickman0000

  • Jr. Member
  • **
  • Posts: 71
    • PC TSC:  Easily turn a PC into a terminal server client
Re: file transfer by direct network cable between two laptops?
« Reply #6 on: December 04, 2010, 03:24:09 PM »
Agreed.  I think the method involving the least steps, is probably OpenSSH.  Gerald, what is the simplest method to set up sshd and keep it running under TC?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11053
Re: file transfer by direct network cable between two laptops?
« Reply #7 on: December 04, 2010, 03:24:39 PM »
tftp is included in the base. Otherwise you could set up an ftp server, or a smb/nfs share.

I haven't used tftp in a while, but IIRC it was enough to start it on the server (use the services gui), and then on the client

tftp -l myimage.jpg -p 1.2.3.4
The only barriers that can stop you are the ones you create yourself.

Offline jonathanbrickman0000

  • Jr. Member
  • **
  • Posts: 71
    • PC TSC:  Easily turn a PC into a terminal server client
Re: file transfer by direct network cable between two laptops?
« Reply #8 on: December 04, 2010, 03:40:45 PM »
Is there a services GUI in TC ????

J.E.B.

Offline nick65go

  • Hero Member
  • *****
  • Posts: 840
Re: file transfer by direct network cable between two laptops?
« Reply #9 on: December 04, 2010, 03:52:39 PM »
@curaga
excellent answer!, it works
-on the laptop A, I started the demon from (GUI right click) window manager menu /system tools /services / checked tftpd (green colour!)
- on laptop B, for coping the remote file "/init", I just run in aterm the command: tftp -gr /init 192.168.1.66
done;

thanks
 
« Last Edit: December 04, 2010, 04:13:36 PM by nick65go »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: file transfer by direct network cable between two laptops?
« Reply #10 on: December 05, 2010, 12:36:47 AM »
Agreed.  I think the method involving the least steps, is probably OpenSSH.  Gerald, what is the simplest method to set up sshd and keep it running under TC?

A more simple method to set up an ssh server would be dropbear rather than OpenSSH.
« Last Edit: December 05, 2010, 03:14:33 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: file transfer by direct network cable between two laptops?
« Reply #11 on: December 05, 2010, 05:02:10 PM »
How about simple peer-to-peer networking?

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: file transfer by direct network cable between two laptops?
« Reply #12 on: December 05, 2010, 08:02:18 PM »
How about simple peer-to-peer networking?

Exactly, like utilising the BusyBox applets of 'nc' and 'tar'. I'm shuffling files in and out of systems with ease. There are a few points to note:

  • Start the process first on one system (e.g. 192.168.1.65) which is put in listening mode, e.g. when receiving files: nc -lp 1234 | tar xvf - or when sending files tar cvf - FILES | nc -lp 1234
  • Then move over to the peer (e.g. 192.168.1.66) and use tar cvf - FILES | nc 192.168.1.65 1234 to send files or nc 192.168.1.65 1234 | tar xvf - to receive files. Just note that you need to specify the IP address or hostname of the listening system.
  • The port number can be any number between 1024 and 65525 which is not already used for another service. I just find 1234 easy to type and is highly likely to be not already in use.
  • It does not matter which system is put in listening mode and which one is not. The roles can be reversed the next time around, but the listening system need to be running prior to the other one.
  • Be careful not to forget or misplace the hyphen in the 'tar' command which symbolises STDIN or STDOUT, as otherwise you could end up overwriting your source files (e.g. when doing 'tar cvf FILES').
  • The current 'nc' applet has a bug isofar as it does not detect the end-of-file correctly (and yes I wanted to file a bug about this which still on my list ...). So you'll need to check on the receiving end that all files have come though completely, which for smaller files happens pretty fast anyway. After you are happy that the transmission is over, just interrupt either process (e.g. with 'Ctrl-C').

For me this slightly awkward workaround is a small price to pay for not needing any other tool to quicly exchange some files. But it's not suitable for a "tighter integration" of two systems where you want permanent access to either systems files and not just on an ad-hoc basis.

Offline nick65go

  • Hero Member
  • *****
  • Posts: 840
Re: file transfer by direct network cable between two laptops?
« Reply #13 on: December 06, 2010, 08:39:45 AM »
wow, another good documented solution. I will try it, as it uses busybox already included  in TC base.

Any new idea is welcome, as I try to learn linux networking; I just need the tips & trick to guide me in the right direction, them I will read the specific docs myself.

Maro, thank you very much.
« Last Edit: December 06, 2010, 08:44:14 AM by nick65go »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14853
Re: file transfer by direct network cable between two laptops?
« Reply #14 on: December 06, 2010, 08:55:16 AM »
on <cough> windows machines, file transfer can be achieved using a firewire cable.

There must surely be a way to do this on linux machines...

http://pthree.org/2008/06/01/firewire-networking-in-linux/ maybe?