Comment Comment by cferr Another way to touch a file:cp /dev/null fileTest if a port is listening without telnet:echo > /dev/tcp/address/port && echo Yes || echo NoThat's not actually a file. It's just a path Bash recognizes and is the interface to socket functionality. udp works too. parent cferr 4 years ago
cp /dev/null file
Test if a port is listening without telnet:
echo > /dev/tcp/address/port && echo Yes || echo No
That's not actually a file. It's just a path Bash recognizes and is the interface to socket functionality. udp works too.