Search code examples
filesystemsplan-9

Plan9 file-type


It has been said that in plan 9 everything is a file.

Please list everything,

i.e. all things represented in the filesystem in plan9(especially things that are not files in *nix os-es).


Solution

  • It is not totally true that "everything is a file" but rather that most things have a file-like interface. It may seem like splitting hairs, but there's a difference. I don't think that I'll be able to list everything, but I'll give you some examples.

    • The interface for TCP/IP is a filesystem, /net exposes "files"
    • The text editor acme has associated control files to which textual commands may be written to change text in the window
    • The mouse and keyboard are represented as data files, /dev/mouse for example
    • The windowing system rio exposes a filesystem interface
    • The web browser abaco reads from a mounted webfs filesystem

    The interesting thing is what sort of interaction "falls out" of this arrangement. Since most everything is text in a file somewhere, you can use normal shell scripts to implement things like an IRC client (read/write text directly to the network "file").

    There are a lot of papers in the /sys/doc directory (and on the web) about the design and implementation of Plan 9.