Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I having the file called 'live' in ubuntu, this is the socket/inode type file. This file has the permission as

srw-rw-r-- live

I want to create the copy of the file.

I not able to copy it using cp command from terminal.

Pls anyone tell me how to copy this file or else how to create new socket/inode file in ubuntu.

This file used in check_mk monitoring console.

Thanks....

share|improve this question

1 Answer 1

up vote 2 down vote accepted

A Unix socket is not a "file" in the way you are thinking.

This file doesn't contain a fixed amount of data which you can copy onto another location. It's not like creating a text file and ending up with myfile.txt which doesn't change until you open it again.

Think of the socket file as a "window" into the application, and the data which that window contains will change as the application runs.

If you wish to view what is happening in this socket, you can use socat to intercept the data flow in realtime. For example:

http://stackoverflow.com/questions/16045046/how-to-fork-transferred-data-to-a-script-with-socat

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.