8

I am getting this report when i use the cat to view files within the /tmp directory.

cat /tmp/st.socket

cat: /tmp/st.socket No such device or address

Cheers

1 Answers1

16

You (via cat) are trying to open and read a UNIX domain socket and that is not how they are properly accessed. Sockets are used by client/server processes to exchange data. They must be accessed with different system calls than open(); you only get a failure with errno == ENXIO "No such device or address" if you use open().

If you ls -l /tmp/st.socket you'll likely see something like

srwxrwxrwx    1 root    root            0 Jan 24  2012 /tmp/st.socket

The 's' at the beginning of the line indicates that /tmp/st.socket is a socket.

Kyle Jones
  • 6,364