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

7,797

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:
7,797

Related videos on Youtube

kengimel
Author by

kengimel

Updated on September 18, 2022

Comments

  • kengimel
    kengimel over 1 year

    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

    • Admin
      Admin about 12 years
      What is its type? What does ls -l /tmp/st.socket show?
    • Admin
      Admin about 12 years
      @DavidSchwartz ls -l give me this: srwxrwxrwx 1 root root 0 2012-03-18 23:19 /tmp/st.socket