4 ms·
I very much prefer using "tar" and "nc". Example: Host1: "tar -cf - /file1 /file2 | nc -l -p 54321" Host2: "nc host1 54321 | tar -xf -"
by bcook 10y ago
I very much prefer using "tar" and "nc".
Example:
Host1: "tar -cf - /file1 /file2 | nc -l -p 54321"
Host2: "nc host1 54321 | tar -xf -"
- schoen 10y agoIndeed, the tools listing in that post makes clear that nc should be available. If you have another Unix machine elsewhere, the nc solution avoids having to install any new software on either machine.
- bitquark 10y agoIndeed! I meant to mention the nc option, but I've found that ftpput/get are more often available than nc, perhaps something to do with the ubiquity of ftp.
- netsec_burn 10y agoMuch the other way around. Netcat is ubiquitous. I haven't come across many systems with ftpput and ftpget. Neat challenge left as an exercise to the reader: whois can be used to transfer files too. :)
- bitquark 10y agoInteresting, we must be looking at a different class of devices. If we're going down that road, there's always base64 and copy + paste!
- na85 10y ago>whois can be used to transfer files too. Ah, the old DNS-tunnelling trick. A fun way to flip cheap hotels the bird.
- micro_softy 10y agoHe is suggesting something much easier and different from DNS. WHOIS is one of the simplest internet protocols. The RFC is beautifully short. Unlike DNS, there's no rules on sizes of requests or responses, and it uses TCP by default. His suggestion deserves an upvote for its simplicity, elegance.
- kjetijor 10y agoIf you have bash, you can even partially get by without netcat as well. Bash has the wonderful "fake" devicenodes, /dev/tcp/host/port and /dev/udp/host/port.
- jandrese 10y agoIf your system is running busybox you usually won't have full fat bash. One thing that annoys me is how people will crack a quad core 1.6Ghz smartphone with 64Gb of storage and then install busybox to save those 50Mb over a regular shell environment that won't embarrass itself on every shell script or configure script.
- voltagex_ 10y agoIt's easier to cross-compile busybox (or toybox) than Bash. Cross compiling for Linux is annoying, cross compiling for Android is even more annoying.
- bitquark 10y agoAgreed, I've clarified why I went with ftp and added a note with example usage of nc, thanks!