It’s not entirely true that “everything is a file”, but rather that most things have a file interface. It may seem like splitting hair, but there is a difference. I do not think that I can list everything, but I will give a few examples.
- The interface for TCP / IP is the file system,
/net expands the "files" - The
acme text editor has associated control files for which text commands can be written to change text in a window. - The mouse and keyboard are represented as data files, for example
/dev/mouse for example - The
rio window system provides a file system interface - The
abaco web browser reads abaco from the installed file system
What is interesting is what kind of interaction “falls out” of this arrangement. Since most of them are text in a file, you can use ordinary shell scripts to implement such things as an IRC client (reading / writing text directly to a network file).
There are many documents (and on the web ) in the /sys/doc directory about the design and implementation of Plan 9.
source share