Digital Magpie

Ooh, ooh, look - shiny things!

Why Everything Is a File

One of the distinguishing characteristics of Unix is the philosophy that “everything is a file” (taken even further in Linux and Plan 9). Reading the interview with Ken Thompson in Coders at Work (page 465) sheds some light on why this is the case:

Seibel: So you basically wrote an OS so you’d have a better environment to test your file system. Thompson: Yes. Halfway through there that I realized it was a real time-sharing system. I was writing the shell to drive the file system. And then I was writing a couple other programs that drove the file system. And right about there I said, “All I need is an editor and I’ve got an operating system.”

So Unix started life as a glorified test harness for Ken’s file system! Amusing…