Need to quickly transfer a file from one computer to another? They don't have AirDrop and you can't find a memory stick? No worries; netcat comes to the rescue. This tip works on Linux as well as OSX.
I'm going to suppose you're on the same LAN, and you want to transfer a file called
photos.zip. First, open up a terminal on the receiving computer and type
ifconfig|grep "inet " to find out its IP address:
$ ifconfig|grep "inet " inet 127.0.0.1 netmask 0xff000000 inet 192.168.1.243 netmask 0xffffff00 broadcast 192.168.1.255 $ █
The IP address is
192.168.1.243. (We don't want
127.0.0.1, because that's a loopback address that only works locally.)
Then make netcat listen to a port by typing
nc -l 12345 > photos.zip. On the sending side, type
nc 192.168.1.243 12345 < photos.zip (or whatever the IP address and file name are). And magic happens!