Pseudo file systems on * nix

I need some pointers to creating pseudo file systems for linux / * nix systems.

Firstly, when I say pseudo file system, I mean something like / proc, where the actual files on the disks or such, but the state of the kernel, are not displayed inside the structure. I would like to try something similar to the application interface.

As an example, you can connect ftp-url to your file system, and your browser application can allow you to interact with the remote system running ls and others and translate standard file system requests into ftp files.

So, the first question: how to do this? I read a little about this, and it looks like you need to implement a new kernel module. If possible, I would like to avoid this - I thought that someone might have already provided a tool for this kind of thing and provided a module to help already.

My second question is: does anyone have a good list of sample applications / services / no matter what method is used to provide the file system based interface.

Finally, if anyone has any opinions on why it might be a good / bad idea to do such a thing at a general level, I would like to hear it.

+6
linux unix filesystems
source share
2 answers

A user space file system via fuse will probably be your best way.

+9
source share

As for the next part of your question (which applications use this method), i.e. wmii window manager, it uses 9p with v9fs , which is the 9p port for Linux. There are many examples on plan9, primarily acme. I suggested a fuse because it seems more actively developed and common in the Linux world, but plan9 is pretty much a reference to this approach, as far as I know.

+3
source share

All Articles