Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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

1 Answer 1

up vote 3 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.