Re:A Unix Utility You Should Know About: Netcat (2009)
by augustl on Monday August 05, 2013 @02:26AM
(#6158722)
Be aware that GNU netcat and BSD netcat are incompatible. Many a time have I attempted to cat a file from a Mac to a PC running Linux, only to have found that Nothing Happens (tm). I just recently realized that installing BSD netcat on Linux solves the problem. Not sure what the actual incompatibility is, just a heads up.
[ Parent
| on HN ]
Re:A Unix Utility You Should Know About: Netcat (2009)
by pflanze on Monday August 05, 2013 @11:29AM
(#6160661)
For my own purposes[1], I wrote these wrappers that abstract the differences between the two versions of nc that I had to deal with away:
https://github.com/pflanze/chj-bin/blob/master/netcat-get https://github.com/pflanze/chj-bin/blob/master/netcat-push https://github.com/pflanze/chj-bin/blob/master/netcat-receiv... https://github.com/pflanze/chj-bin/blob/master/netcat-serve-...
(They use 'have' from here: https://github.com/pflanze/chj-bin/blob/master/have )
[1] for example my way to transfer files between servers: https://github.com/pflanze/chj-bin/blob/master/netoffer (which depends on netfetch from the same place)
Re:A Unix Utility You Should Know About: Netcat (2009)
by bartbes on Monday August 05, 2013 @06:59AM
(#6159413)
If I remember correctly one of them requires you to specify the port with -p separately, and the other gets it from -l. So it's nc -l 1234 on one, and nc -l -p 1234 on the other.