Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


share|improve this question
What is its type? What does ls -l /tmp/st.socket show? – David Schwartz Mar 19 '12 at 16:49
@DavidSchwartz ls -l give me this: srwxrwxrwx 1 root root 0 2012-03-18 23:19 /tmp/st.socket – kengimel Mar 19 '12 at 19:51
up vote 7 down vote accepted

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .