0

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....

2 Answers 2

2

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:

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

-2

You cannot create it, but you can copy from a working system as below to some shared location between the machines and copy from the shared location to the other system.

Machine A

cp -rf /dev/SRC shared_directory

Machine B

cp -rf shared_directory /dev/

You must log in to answer this question.

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