Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: nick65go on December 04, 2010, 11:18:34 AM
-
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'
-
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.
-
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;
-
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.
-
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?
-
Your local lan traffic will not go out to the internet, so don't worry about it.
-
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?
-
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
-
Is there a services GUI in TC ????
J.E.B.
-
@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
-
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.
-
How about simple peer-to-peer networking?
-
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.
-
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.
-
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/ (http://pthree.org/2008/06/01/firewire-networking-in-linux/) maybe?
-
My laptops are DELL insipron 9400 and DELL mini 910.
read from here: http://en.wikipedia.org/wiki/Ethernet_crossover_cable#Automatic_crossover
i have a blue T568B wired connectors cable for 100BASE-TX
I want to report successful DIRECT connection between two PC, using just an ordinary network cable. (i used my PC to router NIC blue cable for test); Then I checked two times more, with one black cable, then with another white cable, it works ;)
It seems that the if the cable is ordinary new generation 5E then it has ALL 8 internal wire correct linked to plugins, OR both my laptop NIC cards are smart enough to cross connect :)
- the white cable has only pins 1,2,3 and 6 linked, and still works;
Then I use tftp service...