4 ms·
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 N
by augustl 13y ago
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.
- bifrost 13y agoI just confirmed this is not the case. Could you share what you were doing?
- augustl 13y agoSeems like bartbes pointed out the problem. I suppose not specifying the port correctly makes it use some default port or something like that.
- bartbes 13y agoIf 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.
- pflanze 13y agoFor 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-get https://github.com/pflanze/chj-bin/blob/master/netcat-push https://github.com/pflanze/chj-bin/blob/master/netcat-push https://github.com/pflanze/chj-bin/blob/master/netcat-receive-on-port https://github.com/pflanze/chj-bin/blob/master/netcat-receiv... https://github.com/pflanze/chj-bin/blob/master/netcat-serve-on-port https://github.com/pflanze/chj-bin/blob/master/netcat-serve-... (They use 'have' from here: https://github.com/pflanze/chj-bin/blob/master/have 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 https://github.com/pflanze/chj-bin/blob/master/netoffer (which depends on netfetch from the same place)