3 ms·
Some light Googling[1][2] shows that Solaris's /dev/tcp is some sort of pseudo-device for configuring the system's network settings. For both the Bash and Korn
by jmillikin 5y ago
Some light Googling[1][2] shows that Solaris's /dev/tcp is some sort of pseudo-device for configuring the system's network settings.
For both the Bash and Korn shells, the syntax looks like this:
$ cat < /dev/tcp/localhost/1234
with traffic being uni-directional. More complex (bi-directional) examples documented at <https://tldp.org/LDP/abs/html/devref1.html#DEVTCP https://tldp.org/LDP/abs/html/devref1.html#DEVTCP>.
Tested on macOS:
# in one terminal
bash$ nc -l 1234
# in second terminal
bash$ cat </dev/tcp/localhost/1234
# lines typed into the 'nc' terminal will be printed to
# the other.
[1] https://docs.oracle.com/cd/E19857-01/817-1836-10/perfplat.html https://docs.oracle.com/cd/E19857-01/817-1836-10/perfplat.ht...
[2] https://www.ibm.com/docs/en/was-nd/8.5.5?topic=systems-tuning-solaris https://www.ibm.com/docs/en/was-nd/8.5.5?topic=systems-tunin...
- smackeyacky 5y agoThe modern incarnations (appending server and port numbers) to /dev/tcp in Solaris doesn't work. No matter. Very curious as to why ftp doesn't work, I think I have missed something on the Debian side of things to enable old school ftp clients. You can log in, but even setting the system to PASV does nothing. 500 Port Rejected is the error you get.