Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a virtual device in linux?

My question is pretty much the same as - How to create a virtual file? except I want to do it in Linux instead. I imagine what I need to do is create a virtual device and point the application logging to that device. I'd like to write the device in python or ruby or something else interpreted, if possible.

like image 340
Nathan Avatar asked May 25 '11 14:05

Nathan


2 Answers

check out named pipes http://en.wikipedia.org/wiki/Named_pipe

like image 58
David Chan Avatar answered Oct 20 '22 01:10

David Chan


Use mknod. You can create a socket file which your apps can write too. And your logging app would connect to the socket to read from it.

like image 25
Marc B Avatar answered Oct 20 '22 00:10

Marc B